devops promote
Promote work items or a pipeline stage to a target pipeline stage.
Promote specific work items or all approved work items from a source stage to the target pipeline stage.
Pass –work-item-id to promote one or more specific work items to the target stage.
Pass –stage-id to promote all approved work items from that source stage to the target stage.
Exactly one of –work-item-id or –stage-id must be provided.
Use –deploy-all to deploy all metadata in the branch rather than only changes not yet in the target stage.
| Flag Name (Long) | Flag Name (Short) | Description |
|---|---|---|
‑‑api‑version | N/A | Type: Value Override the api version used for api requests made by this command |
‑‑deploy‑all | ‑a | Type: Boolean Deploy all metadata in the branch to the stage’s org. If you don’t specify this flag, only changes in the stage’s branch are deployed. |
‑‑flags‑dir | N/A | Type: Value Import flag values from a directory. |
‑‑json | N/A | Type: Boolean Format output as json. |
‑‑stage‑id | ‑s | Type: Value ID of the source pipeline stage whose approved work items will be promoted. Mutually exclusive with –work-item-id. |
‑‑target‑org | ‑o | Type: Value Required Username or alias of the target org. Not required if the target-org configuration variable is already set. |
‑‑target‑stage‑id | ‑t | Type: Value Required ID of the pipeline stage to promote to. |
‑‑test‑level | ‑l | Type: Value Valid Values: NoTestRun, RunSpecifiedTests, RunLocalTests, RunAllTestsInOrgDeployment Apex testing level. Valid values are:
If you don’t specify a test level, the default behavior depends on the contents of your deployment package. For more information, see the section “Running Tests in a Deployment” in the “Metadata API Developer Guide”. (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_deploy_running_tests.htm) |
‑‑tests | N/A | Type: Value Apex tests to run when –test-level is RunSpecifiedTests. Separate multiple test names with commas. Enclose the entire flag value in double quotes if a test name contains spaces. |
‑‑work‑item‑id | ‑i | Type: Value ID of the work item to promote. Mutually exclusive with –stage-id. Specify this flag multiple times to promote multiple work items in a single operation. |
Promote all approved work items from a source stage to a target stage:
Promote a specific work item to a stage:
Promote multiple work items:
Promote a stage with full deploy: