change-pipeline (chgp)
Manage changes from GitLab pipelines.
Manage changes from GitLab pipelines. This command is designed to be called from CI/CD pipelines to track change management workflows.
Subcommands
| Subcommand | Description |
|---|---|
create | Create a new change (or attach a pipeline to an existing one) |
approve | Approve a change |
implement | Start implementation of a change |
complete | Mark a change as done |
Flags
Command-level flags
These flags apply to all change-pipeline subcommands:
| Flag | Env Var | Required | Default | Description |
|---|---|---|---|---|
--gitlab-url | CI_SERVER_URL | Yes | GitLab instance URL | |
--gitlab-project-id | CI_PROJECT_ID | Yes | GitLab project id | |
--gitlab-sha | CI_COMMIT_SHA | Yes | Git commit SHA | |
--gitlab-pipeline-id | CI_PIPELINE_ID | Yes | GitLab pipeline id | |
--gitlab-merge-request-id | CI_MERGE_REQUEST_ID | No | GitLab merge request id | |
--gitlab-merge-request-iid | CI_MERGE_REQUEST_IID | No | GitLab merge request iid | |
--gitlab-pipeline-url | CI_PIPELINE_URL | Yes | GitLab pipeline URL | |
--workflow | CHANGE_WORKFLOW | No | tag | Workflow type: tag or merge request |
create flags
| Flag | Alias | Env Var | Required | Default | Description |
|---|---|---|---|---|---|
--template-file | --tf | CHANGE_TEMPLATE_FILE | No | .change.yml | Path to YAML template file |
--name | CHANGE_NAME | Yes | Change name | ||
--process | CHANGE_PROCESS_ID | Yes | Change process | ||
--platform | CHANGE_PLATFORM | Yes | Targeted platform | ||
--description | CHANGE_DESCRIPTION | No | Change description | ||
--impact | CHANGE_IMPACT | No | Change impact | ||
--components | CHANGE_COMPONENTS | No | Components (comma separated) | ||
--tenant | CHANGE_TENANT | No | Tenant linked to the change | ||
--implementors | CHANGE_IMPLEMENTORS | No | Implementor emails (comma separated) | ||
--communication-plan | CHANGE_COMMUNICATION_PLAN | No | Communication plan | ||
--monitoring-plan | CHANGE_MONITORING_PLAN | No | Monitoring plan | ||
--change-plan | CHANGE_CHANGE_PLAN | No | Description of the change plan | ||
--test-plan | CHANGE_TEST_PLAN | No | Test plan | ||
--rollback-plan | CHANGE_ROLLBACK_PLAN | No | Rollback plan | ||
--start-time | CHANGE_START_TIME | No | Scheduled start time (RFC 3339) | ||
--end-time | CHANGE_END_TIME | No | Scheduled end time (RFC 3339) | ||
--data | CHANGE_DATA | No | JSON data for the change | ||
--data-file-path | CHANGE_DATA_FILE_PATH | No | Path to JSON data file | ||
--data-allow-json-schema-errors | CHANGE_DATA_ALLOW_JSON_SCHEMA_ERRORS | No | true | Allow JSON schema errors | |
--id | CHANGE_ID | No | Existing change id to attach pipeline to |
.change.yml Template File
Instead of passing every flag, you can define change parameters in a .change.yml file at the root of your repository. Flags and env vars take precedence over template values.
name: "Firewall upgrade v2.14"
process: "standard"
platform: "prod-emea"
description: "Upgrade firewall firmware to version 2.14.0"
impact: "Temporary connectivity loss (< 5 min)"
components: "firewall,network"
tenant: "acme-prod"
implementors:
- "alice@example.com"
- "bob@example.com"
communication_plan: "Slack message to #ops-changes"
monitoring_plan: "Monitor firewall dashboard for 1 hour"
change_plan: "Upgrade firewall firmware to v2.14.0"
test_plan: "Run connectivity tests after upgrade"
rollback_plan: "Downgrade to v2.13.0 if tests fail"
data:
firmware_version: "2.14.0"
previous_version: "2.13.0"Examples
# Create a change from CI (env vars auto-populated by GitLab)
gi chgp create --name "Deploy v1.5" --process standard --platform prod-emea
# Create using a template file
gi chgp create --template-file .change.yml
# Attach pipeline to an existing change
gi chgp create --name "Deploy v1.5" --process standard --platform prod-emea --id CHG-12345
# Approve, implement, and complete a change
gi chgp approve
gi chgp implement
gi chgp complete