Promote work items or a pipeline stage to a target pipeline stage.
Description for devops promote
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.
Flags
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, RunAllTestsInOrg
Deployment Apex testing level.
Valid values are:
NoTestRun — No tests are run. This test level applies only to deployments to development environments, such as sandbox, Developer Edition, or trial orgs. This test level is the default for development environments.
RunSpecifiedTests — Runs only the tests that you specify with the –tests flag. Code coverage requirements differ from the default coverage requirements when using this test level. Executed tests must comprise a minimum of 75% code coverage for each class and trigger in the deployment package. This coverage is computed for each class and trigger individually and is different than the overall coverage percentage.
RunLocalTests — All tests in your org are run, except the ones that originate from installed managed and unlocked packages. This test level is the default for production deployments that include Apex classes or triggers.
RunAllTestsInOrg — All tests in your org are run, including tests of managed packages.