Skip to content

Commands

scm-engine

NAME:
   scm-engine - GitHub/GitLab automation

USAGE:
   scm-engine [global options] command [command options] 

VERSION:
   dev (date: unknown; commit: unknown)

AUTHOR:
   Christian Winther <scm-engine@jippi.dev>

COMMANDS:
   gitlab   GitLab related commands
   github   GitHub related commands
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --config value  Path to the scm-engine config file (default: ".scm-engine.yml") [$SCM_ENGINE_CONFIG_FILE]
   --dry-run       Dry run, don't actually _do_ actions, just print them (default: false)
   --help, -h      show help
   --version, -v   print the version

COPYRIGHT:
   Christian Winther

scm-engine gitlab

NAME:
   scm-engine gitlab - GitLab related commands

USAGE:
   scm-engine gitlab command [command options] 

COMMANDS:
   evaluate  Evaluate a Merge Request
   help, h   Shows a list of commands or help for one command

OPTIONS:
   --api-token value  GitLab API token [$SCM_ENGINE_TOKEN]
   --base-url value   Base URL for the SCM instance (default: "https://gitlab.com/") [$SCM_ENGINE_BASE_URL, $CI_SERVER_URL]
   --help, -h         show help

GLOBAL OPTIONS:
   --config value  Path to the scm-engine config file (default: ".scm-engine.yml") [$SCM_ENGINE_CONFIG_FILE]
   --dry-run       Dry run, don't actually _do_ actions, just print them (default: false)
   --help, -h      show help
   --version, -v   print the version

scm-engine gitlab evaluate

NAME:
   scm-engine gitlab evaluate - Evaluate a Merge Request

USAGE:
   scm-engine gitlab evaluate [command options] [mr_id, mr_id, ...]

OPTIONS:
   --update-pipeline  Update the CI pipeline status with progress (default: false) [$SCM_ENGINE_UPDATE_PIPELINE]
   --project value    GitLab project (example: 'gitlab-org/gitlab') [$GITLAB_PROJECT, $CI_PROJECT_PATH]
   --id value         The Merge Request ID to process, if not provided as a CLI flag [$CI_MERGE_REQUEST_IID]
   --commit value     The git commit sha [$CI_COMMIT_SHA]
   --help, -h         show help

GLOBAL OPTIONS:
   --config value  Path to the scm-engine config file (default: ".scm-engine.yml") [$SCM_ENGINE_CONFIG_FILE]
   --dry-run       Dry run, don't actually _do_ actions, just print them (default: false)
   --help, -h      show help
   --version, -v   print the version

scm-engine gitlab server

Point your GitLab webhook at the /gitlab endpoint.

Support the following events, and they will both trigger an Merge Request evaluation

  • Comments - A comment is made or edited on an issue or merge request.
  • Merge request events - A merge request is created, updated, or merged.

Tip

You have access to the raw webhook event payload via webhook_event.* fields in Expr script fields when using server mode. See the GitLab Webhook Events documentation for available fields.

NAME:
   scm-engine gitlab server - Start HTTP server for webhook event driven usage

USAGE:
   scm-engine gitlab server [command options]

OPTIONS:
   --webhook-secret value  Used to validate received payloads. Sent with the request in the X-Gitlab-Token HTTP header [$SCM_ENGINE_WEBHOOK_SECRET]
   --listen value          IP + Port that the HTTP server should listen on (default: "0.0.0.0:3000") [$SCM_ENGINE_LISTEN]
   --update-pipeline       Update the CI pipeline status with progress (default: true) [$SCM_ENGINE_UPDATE_PIPELINE]
   --help, -h              show help

GLOBAL OPTIONS:
   --config value  Path to the scm-engine config file (default: ".scm-engine.yml") [$SCM_ENGINE_CONFIG_FILE]
   --dry-run       Dry run, don't actually _do_ actions, just print them (default: false)
   --help, -h      show help
   --version, -v   print the version