Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

629 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOTE: This command is currently in beta. Any aspect of this command can change without advanced notice. Don't use beta commands in your scripts.

plugin-devops-center

Contributing

  1. Please read our Code of Conduct
  2. Create a new issue before starting your project so that we can keep track of what you are trying to add/fix. That way, we can also offer suggestions or let you know if there is already an effort in progress.
  3. Fork this repository.
  4. Build the plugin locally
  5. Create a topic branch in your fork. Note, this step is recommended but technically not required if contributing using a fork.
  6. Edit the code in your fork.
  7. Write appropriate tests for your changes. Try to achieve at least 95% code coverage on any new code. No pull request will be accepted without unit tests.
  8. Sign CLA (see CLA below).
  9. Send us a pull request when you are done. We'll review your code, suggest any needed changes, and merge it in.

CLA

External contributors will be required to sign a Contributor's License Agreement. You can do so by going to https://cla.salesforce.com/sign-cla.

Build

To build the plugin locally, make sure to have yarn installed and run the following commands:

# Clone the repository
git clone [email protected]:salesforcecli/plugin-devops-center

# Install the dependencies and compile
yarn && yarn build

To use your plugin, run using the local ./bin/dev or ./bin/dev.cmd file.

# Run using local run file.
./bin/dev project deploy pipeline start

There should be no differences when running via the Salesforce CLI or using the local run file. However, it can be useful to link the plugin to do some additional testing or run your commands from anywhere on your machine.

# Link your plugin to the sf cli
sf plugins link .

# To verify
sf plugins

Commands

sf devops pipeline create

Create a DevOps Center pipeline.

USAGE
  $ sf devops pipeline create -o <value> -n <value> -r <value> [--json] [--flags-dir <value>] [--api-version <value>]
    [--repo-type github|bitbucket] [--create-repo] [--repo-owner <value>] [--bitbucket-workspace <value>]
    [--bitbucket-project-key <value>] [-d <value>]

FLAGS
  -d, --description=<value>            Description of the pipeline.
  -n, --name=<value>                   (required) Name of the pipeline.
  -o, --target-org=<value>             (required) Username or alias of the target org. Not required if the `target-org`
                                       configuration variable is already set.
  -r, --repo=<value>                   (required) URL of an existing repository or the name of a repository to create.
      --api-version=<value>            Override the api version used for api requests made by this command
      --bitbucket-project-key=<value>  Bitbucket project key to associate with the repository. Optional when creating a
                                       Bitbucket repository using '--create-repo'.
      --bitbucket-workspace=<value>    Bitbucket workspace that will own the repository. Required when creating a
                                       Bitbucket repository using '--create-repo'.
      --create-repo                    Create a repository if it doesn't exist.
      --repo-owner=<value>             Owner (organization or user) of the GitHub repository. Required when creating a
                                       GitHub repository using '--create-repo'.
      --repo-type=<option>             Type of the source code repository. Required when creating a repository using
                                       '--create-repo'.
                                       <options: github|bitbucket>

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  Create a DevOps Center pipeline.

  Provide the URL of an existing repository, or use `--create-repo` with a repository name to create one. After you
  create the pipeline, add stages, and activate the pipeline.

EXAMPLES
  Create a pipeline and associate it with an existing GitHub repository.

    $ sf devops pipeline create --target-org my-devops-org --name "Release Pipeline" --repo \
      https://github.com/myorg/myrepo

  Create a pipeline and associate it with a new GitHub repository.

    $ sf devops pipeline create --target-org my-devops-org --name "Release Pipeline" --repo my-new-repo --repo-type \
      github --repo-owner myorg --create-repo

  Create a pipeline and create a new Bitbucket repository.

    $ sf devops pipeline create --target-org my-devops-org --name "Release Pipeline" --repo my-new-repo --repo-type \
      bitbucket --bitbucket-workspace myworkspace --bitbucket-project-key PROJ --create-repo

  Create a pipeline with a description and associate it with an existing Bitbucket repository.

    $ sf devops pipeline create --target-org my-devops-org --name "Release Pipeline" --repo \
      https://bitbucket.org/myworkspace/myrepo --description "Main CI/CD pipeline for production releases"

See code: src/commands/devops/pipeline/create.ts

sf devops pipeline get

Get details of a DevOps Center pipeline including its stages, repositories, and connected projects.

USAGE
  $ sf devops pipeline get -o <value> -i <value> [--json] [--flags-dir <value>] [--api-version <value>]

FLAGS
  -i, --pipeline-id=<value>  (required) ID of the DevOps Center pipeline.
  -o, --target-org=<value>   (required) Username or alias of the target org. Not required if the `target-org`
                             configuration variable is already set.
      --api-version=<value>  Override the api version used for api requests made by this command

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  Get details of a DevOps Center pipeline including its stages, repositories, and connected projects.

  Returns full details for a single DevOps Center pipeline: its stages in order, the source code repository and branch
  associated with each stage, and any connected projects.

EXAMPLES
  Get details for a specific pipeline:

    $ sf devops pipeline get --target-org my-devops-org --pipeline-id 0Do000000000001

See code: src/commands/devops/pipeline/get.ts

sf devops pipeline list

List DevOps Center pipelines with their stages, repositories, and connected projects.

USAGE
  $ sf devops pipeline list -o <value> [--json] [--flags-dir <value>] [--api-version <value>]

FLAGS
  -o, --target-org=<value>   (required) Username or alias of the target org. Not required if the `target-org`
                             configuration variable is already set.
      --api-version=<value>  Override the api version used for api requests made by this command

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  List DevOps Center pipelines with their stages, repositories, and connected projects.

  Returns all DevOps Center pipelines in the org, including each pipeline's stages (in order), source code repository
  information per stage, and any connected projects.

EXAMPLES
  List all pipelines in the org:

    $ sf devops pipeline list --target-org my-devops-org

See code: src/commands/devops/pipeline/list.ts

sf devops pipeline project add

Attach a DevOps Center project to a pipeline.

USAGE
  $ sf devops pipeline project add -o <value> --pipeline-id <value> --project-id <value> [--json] [--flags-dir <value>]
    [--api-version <value>]

FLAGS
  -o, --target-org=<value>   (required) Username or alias of the target org. Not required if the `target-org`
                             configuration variable is already set.
      --api-version=<value>  Override the api version used for api requests made by this command
      --pipeline-id=<value>  (required) ID of the pipeline.
      --project-id=<value>   (required) ID of the DevOps Center project.

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  Attach a DevOps Center project to a pipeline.

  You can attach a project to only one pipeline.

EXAMPLES
  Attach a project to a pipeline using the project ID and pipeline ID.

    $ sf devops pipeline project add --target-org my-devops-org --pipeline-id 0XB000000000001 --project-id \
      0Hn000000000001

See code: src/commands/devops/pipeline/project/add.ts

sf devops pipeline project delete

Remove a DevOps Center project's connection to a pipeline.

USAGE
  $ sf devops pipeline project delete -o <value> --pipeline-id <value> --project-id <value> [--json] [--flags-dir <value>]
    [--api-version <value>]

FLAGS
  -o, --target-org=<value>   (required) Username or alias of the target org. Not required if the `target-org`
                             configuration variable is already set.
      --api-version=<value>  Override the api version used for api requests made by this command
      --pipeline-id=<value>  (required) ID of the pipeline.
      --project-id=<value>   (required) ID of the DevOps Center project.

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  Remove a DevOps Center project's connection to a pipeline.

  Deletes the junction record that connects the project to the pipeline. The project itself is not deleted.

EXAMPLES
  Remove a project from a pipeline using the project ID and pipeline ID.

    $ sf devops pipeline project delete --target-org my-devops-org --pipeline-id 0XB000000000001 --project-id \
      0Hn000000000001

See code: src/commands/devops/pipeline/project/delete.ts

sf devops pipeline stage add

Add a stage to a DevOps Center pipeline.

USAGE
  $ sf devops pipeline stage add -o <value> --pipeline-id <value> -n <value> --next-stage-id <value> [--json] [--flags-dir
    <value>] [--api-version <value>]

FLAGS
  -n, --name=<value>           (required) Name of the pipeline stage, such as Integration, UAT, or Staging.
  -o, --target-org=<value>     (required) Username or alias of the target org. Not required if the `target-org`
                               configuration variable is already set.
      --api-version=<value>    Override the api version used for api requests made by this command
      --next-stage-id=<value>  (required) ID of the stage that follows the new stage in the pipeline.
      --pipeline-id=<value>    (required) ID of the pipeline where the stage is added.

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  Add a stage to a DevOps Center pipeline.

  Inserts an empty stage before the stage specified by `--next-stage-id`. The new stage doesn't include a branch or
  environment. Configure them separately after you create the stage.

EXAMPLES
  Add a Development stage before Integration in a specific pipeline.

    $ sf devops pipeline stage add --target-org my-devops-org --pipeline-id 0XB000000000001 --name "Development" \
      --next-stage-id 0Xc000000000002

  Add a QA stage before UAT in a specific pipeline.

    $ sf devops pipeline stage add --target-org my-devops-org --pipeline-id 0XB000000000001 --name "QA" \
      --next-stage-id 0Xc000000000003

See code: src/commands/devops/pipeline/stage/add.ts

sf devops pipeline stage delete

Delete a stage from a DevOps Center pipeline.

USAGE
  $ sf devops pipeline stage delete -o <value> --pipeline-id <value> --stage-id <value> [--json] [--flags-dir <value>]
    [--api-version <value>]

FLAGS
  -o, --target-org=<value>   (required) Username or alias of the target org. Not required if the `target-org`
                             configuration variable is already set.
      --api-version=<value>  Override the api version used for api requests made by this command
      --pipeline-id=<value>  (required) ID of the pipeline that contains the stage.
      --stage-id=<value>     (required) ID of the stage to delete.

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  Delete a stage from a DevOps Center pipeline.

  Deletes the specified stage from the pipeline. If the stage sits between two other stages, the predecessor stage is
  automatically re-linked to the successor so the pipeline chain stays intact.

EXAMPLES
  Delete a stage from a pipeline:

    $ sf devops pipeline stage delete --target-org my-devops-org --pipeline-id 0XB000000000001 --stage-id \
      0Xc000000000002

See code: src/commands/devops/pipeline/stage/delete.ts

sf devops pipeline update

Update a DevOps Center pipeline.

USAGE
  $ sf devops pipeline update -o <value> --pipeline-id <value> [--json] [--flags-dir <value>] [--api-version <value>]
    [--active] [-n <value>]

FLAGS
  -n, --name=<value>         New name for the pipeline.
  -o, --target-org=<value>   (required) Username or alias of the target org. Not required if the `target-org`
                             configuration variable is already set.
      --[no-]active          Activate the pipeline. Use --no-active to deactivate.
      --api-version=<value>  Override the api version used for api requests made by this command
      --pipeline-id=<value>  (required) ID of the pipeline.

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  Update a DevOps Center pipeline.

  Activate, deactivate, or rename a DevOps Center pipeline. Use --active to activate, --no-active to deactivate, and
  --name to rename. You can combine --no-active and --name in one command.

  A pipeline must have at least one stage before you can activate it. You can't modify the pipeline stages after you
  activate and promote changes through it.

EXAMPLES
  Activate a pipeline:

    $ sf devops pipeline update --target-org my-devops-org --pipeline-id 0XB000000000001 --active

  Deactivate and rename in one step.

    $ sf devops pipeline update --target-org my-devops-org --pipeline-id 0XB000000000001 --no-active --name "My \
      Pipeline"

See code: src/commands/devops/pipeline/update.ts

sf devops project create

Create a DevOps Center project in a DevOps Center org.

USAGE
  $ sf devops project create -o <value> -n <value> [--json] [--flags-dir <value>] [--api-version <value>] [-d <value>]

FLAGS
  -d, --description=<value>  Description of the new project; if not specified, the description is blank.
  -n, --name=<value>         (required) Name of the new DevOps Center project.
  -o, --target-org=<value>   (required) Username or alias of the target org. Not required if the `target-org`
                             configuration variable is already set.
      --api-version=<value>  Override the api version used for api requests made by this command

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  Create a DevOps Center project in a DevOps Center org.

  Creates a new DevOps Center project with the specified name and optional description.

EXAMPLES
  Create a new DevOps Center project in the specified org.

    $ sf devops project create --target-org my-devops-org --name "MyApp Release"

  Create a project with a name and description.

    $ sf devops project create --target-org my-devops-org --name "Platform Update" --description "Platform services \
      update"

See code: src/commands/devops/project/create.ts

sf devops project list

List all DevOps Center projects in a Salesforce org.

USAGE
  $ sf devops project list -o <value> [--json] [--flags-dir <value>] [--api-version <value>]

FLAGS
  -o, --target-org=<value>   (required) Username or alias of the target org. Not required if the `target-org`
                             configuration variable is already set.
      --api-version=<value>  Override the api version used for api requests made by this command

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  List all DevOps Center projects in a Salesforce org.

  This command queries the DevopsProject standard object and returns the project Id, Name, and Description for each
  project found.

EXAMPLES
  List all DevOps Center projects in an org with alias "my-devops-org":

    $ sf devops project list --target-org my-devops-org

  List projects using an org's username:

    $ sf devops project list --target-org [email protected]

See code: src/commands/devops/project/list.ts

sf devops project update

Update a DevOps Center project.

USAGE
  $ sf devops project update -o <value> -i <value> [--json] [--flags-dir <value>] [--api-version <value>] [-n <value>] [-d
    <value>] [--is-active]

FLAGS
  -d, --description=<value>  New description for the project.
  -i, --project-id=<value>   (required) ID of the DevOps Center project to update.
  -n, --name=<value>         New name for the project.
  -o, --target-org=<value>   (required) Username or alias of the target org. Not required if the `target-org`
                             configuration variable is already set.
      --api-version=<value>  Override the api version used for api requests made by this command
      --[no-]is-active       Set the project active status. Use --is-active to activate or --no-is-active to deactivate.

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  Update a DevOps Center project.

  Update the name, description, or active status of a DevOps Center project. At least one of --name, --description, or
  --is-active must be provided.

EXAMPLES
  Rename a project:

    $ sf devops project update --target-org my-devops-org --project-id 1Qg000000000001 --name "MyApp Release v2"

  Update the description of a project:

    $ sf devops project update --target-org my-devops-org --project-id 1Qg000000000001 --description "Updated \
      release description"

  Deactivate a project:

    $ sf devops project update --target-org my-devops-org --project-id 1Qg000000000001 --no-is-active

  Update all fields at once:

    $ sf devops project update --target-org my-devops-org --project-id 1Qg000000000001 --name "Archived App" \
      --description "Archived" --no-is-active

See code: src/commands/devops/project/update.ts

sf devops promote

Promote work items or a pipeline stage to a target pipeline stage.

USAGE
  $ sf devops promote -o <value> -t <value> [--json] [--flags-dir <value>] [--api-version <value>] [-i <value>... |
    -s <value>] [-a] [-l NoTestRun|RunSpecifiedTests|RunLocalTests|RunAllTestsInOrg] [--tests <value>...]

FLAGS
  -a, --deploy-all               Deploy all metadata in the branch to the stage's org.
  -i, --work-item-id=<value>...  ID of the work item to promote. Mutually exclusive with --stage-id.
  -l, --test-level=<option>      Deployment Apex testing level.
                                 <options: NoTestRun|RunSpecifiedTests|RunLocalTests|RunAllTestsInOrg>
  -o, --target-org=<value>       (required) Username or alias of the target org. Not required if the `target-org`
                                 configuration variable is already set.
  -s, --stage-id=<value>         ID of the source pipeline stage whose approved work items will be promoted. Mutually
                                 exclusive with --work-item-id.
  -t, --target-stage-id=<value>  (required) ID of the pipeline stage to promote to.
      --api-version=<value>      Override the api version used for api requests made by this command
      --tests=<value>...         Apex tests to run when --test-level is RunSpecifiedTests.

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  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.

EXAMPLES
  Promote all approved work items from a source stage to a target stage:

    $ sf devops promote --target-org my-devops-org --stage-id 1QVxx0000000001 --target-stage-id 1QVxx0000000002

  Promote a specific work item to a stage:

    $ sf devops promote --target-org my-devops-org --work-item-id 1fkxx0000000001 --target-stage-id 1QVxx0000000001

  Promote multiple work items:

    $ sf devops promote --target-org my-devops-org --work-item-id 1fkxx0000000001 --work-item-id 1fkxx0000000002 \
      --target-stage-id 1QVxx0000000001

  Promote a stage with full deploy:

    $ sf devops promote --target-org my-devops-org --stage-id 1QVxx0000000001 --target-stage-id 1QVxx0000000002 \
      --deploy-all

FLAG DESCRIPTIONS
  -a, --deploy-all  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.

  -i, --work-item-id=<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.

  -l, --test-level=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.

    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=<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.

See code: src/commands/devops/promote.ts

sf devops promotion complete

Deploy undeployed work items to a pipeline stage org.

USAGE
  $ sf devops promotion complete -o <value> -t <value> [--json] [--flags-dir <value>] [--api-version <value>] [-i <value>...]
    [-a] [-l NoTestRun|RunSpecifiedTests|RunLocalTests|RunAllTestsInOrg] [--tests <value>...]

FLAGS
  -a, --deploy-all               Deploy all metadata in the branch to the stage's org.
  -i, --work-item-id=<value>...  ID of a specific work item to deploy. Omit to deploy all undeployed work items for the
                                 stage. Use this for the first stage of a pipeline where no source stage exists.
  -l, --test-level=<option>      Deployment Apex testing level.
                                 <options: NoTestRun|RunSpecifiedTests|RunLocalTests|RunAllTestsInOrg>
  -o, --target-org=<value>       (required) Username or alias of the target org. Not required if the `target-org`
                                 configuration variable is already set.
  -t, --target-stage-id=<value>  (required) ID of the out-of-sync pipeline stage to deploy to.
      --api-version=<value>      Override the api version used for api requests made by this command
      --tests=<value>...         Apex tests to run when --test-level is RunSpecifiedTests.

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  Deploy undeployed work items to a pipeline stage org.

  Deploys work items that were merged into the pipeline branch outside of DevOps Center (externally merged) into the
  target stage org and updates DevOps Center records. Equivalent to the "Complete Promotion" action in the DevOps Center
  UI when a stage is out of sync.

  If no undeployed work items are found for the stage, the command exits successfully with no action taken.

EXAMPLES
  Complete a promotion for an out-of-sync pipeline stage.

    $ sf devops promotion complete --target-org my-devops-org --target-stage-id 1QV000000000001

  Complete a promotion for a specific work item (e.g. first stage of a pipeline).

    $ sf devops promotion complete --target-org my-devops-org --target-stage-id 1QV000000000001 --work-item-id \
      1fk000000000001

  Complete a promotion with full deploy and a specific test level.

    $ sf devops promotion complete --target-org my-devops-org --target-stage-id 1QV000000000001 --deploy-all \
      --test-level RunLocalTests

FLAG DESCRIPTIONS
  -a, --deploy-all  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.

  -l, --test-level=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.

    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=<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.

See code: src/commands/devops/promotion/complete.ts

sf devops request status

Get the status of a request.

USAGE
  $ sf devops request status -o <value> -i <value> [--json] [--flags-dir <value>] [--api-version <value>]

FLAGS
  -i, --request-token=<value>  (required) Request token from the promote response.
  -o, --target-org=<value>     (required) Username or alias of the target org. Not required if the `target-org`
                               configuration variable is already set.
      --api-version=<value>    Override the api version used for api requests made by this command

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  Get the status of a request.

  Returns the current status of a request identified by its request token.

EXAMPLES
  Get the status of a request:

    $ sf devops request status --target-org my-devops-org --request-token a0B000000000001

See code: src/commands/devops/request/status.ts

sf devops review create

Create a pull request for a work item branch.

USAGE
  $ sf devops review create -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [-n <value>] [-w <value>]

FLAGS
  -n, --work-item-name=<value>  Name of the work item, such as WI-000001.
  -o, --target-org=<value>      (required) Username or alias of the target org. Not required if the `target-org`
                                configuration variable is already set.
  -w, --work-item-id=<value>    ID of the work item.
      --api-version=<value>     Override the api version used for api requests made by this command

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  Create a pull request for a work item branch.

  Creates a pull request via the Salesforce DevOps Center API, using the VCS credentials stored in the org. Works with
  GitHub and Bitbucket without requiring local VCS authentication.

EXAMPLES
  Create a pull request for a work item.

    $ sf devops review create --target-org my-devops-org --work-item-name WI-000001

  Create a pull request using the work item ID.

    $ sf devops review create --target-org my-devops-org --work-item-id 0Wx000000000001

See code: src/commands/devops/review/create.ts

sf devops stage branch add

Add a source code repository branch to a pipeline stage.

USAGE
  $ sf devops stage branch add -o <value> --pipeline-id <value> --stage-id <value> -b <value> [--json] [--flags-dir <value>]
    [--api-version <value>] [--create-vcs-branch]

FLAGS
  -b, --branch-name=<value>  (required) Name of the repository branch to assign to the stage.
  -o, --target-org=<value>   (required) Username or alias of the target org. Not required if the `target-org`
                             configuration variable is already set.
      --api-version=<value>  Override the api version used for api requests made by this command
      --create-vcs-branch    Create the branch in the remote repository if it doesn't already exist.
      --pipeline-id=<value>  (required) ID of the pipeline that contains the stage.
      --stage-id=<value>     (required) ID of the pipeline stage to associate the branch with.

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  Add a source code repository branch to a pipeline stage.

  By default, the branch must exist in the repository. Use --create-vcs-branch to create a branch if it doesn't exist.
  Each pipeline stage supports only one branch. Adding a branch replaces any existing branch linked to the pipeline
  stage.

EXAMPLES
  Add an existing branch to a stage:

    $ sf devops stage branch add --target-org my-devops-org --pipeline-id 0Xo000000000001 --stage-id 0Xp000000000001 \
      --branch-name main

  Create and add a branch to a pipeline stage:

    $ sf devops stage branch add --target-org my-devops-org --pipeline-id 0Xo000000000001 --stage-id 0Xp000000000002 \
      --branch-name integration --create-vcs-branch

See code: src/commands/devops/stage/branch/add.ts

sf devops stage environment add

Add a Salesforce environment to a pipeline stage.

USAGE
  $ sf devops stage environment add -o <value> --pipeline-id <value> --stage-id <value> -e <value> --org-type Production|Sandbox
    [--json] [--flags-dir <value>] [--api-version <value>] [--no-browser]

FLAGS
  -e, --environment-name=<value>  (required) Name of the environment.
  -o, --target-org=<value>        (required) Username or alias of the target org. Not required if the `target-org`
                                  configuration variable is already set.
      --api-version=<value>       Override the api version used for api requests made by this command
      --no-browser                Don't auto-open the browser for OAuth authentication. The redirect URL is printed for
                                  manual use.
      --org-type=<option>         (required) Type of the Salesforce org. Valid values: Production, Sandbox.
                                  <options: Production|Sandbox>
      --pipeline-id=<value>       (required) ID of the pipeline that contains the stage.
      --stage-id=<value>          (required) ID of the pipeline stage.

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  Add a Salesforce environment to a pipeline stage.

  This command triggers an OAuth flow to authenticate the environment. A browser window opens automatically for you to
  log in.

EXAMPLES
  Add a production environment to a stage using its ID:

    $ sf devops stage environment add --target-org my-devops-org --stage-id 0Xp000000000001 --environment-name \
      Production_Org --org-type Production

See code: src/commands/devops/stage/environment/add.ts

sf devops stage environment delete

Delete an environment from a DevOps Center pipeline stage.

USAGE
  $ sf devops stage environment delete -o <value> --pipeline-id <value> -e <value> [--json] [--flags-dir <value>] [--api-version
    <value>]

FLAGS
  -e, --environment-id=<value>  (required) ID of the environment to delete.
  -o, --target-org=<value>      (required) Username or alias of the target org. Not required if the `target-org`
                                configuration variable is already set.
      --api-version=<value>     Override the api version used for api requests made by this command
      --pipeline-id=<value>     (required) ID of the pipeline. Used to verify the pipeline is inactive before deleting.

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  Delete an environment from a DevOps Center pipeline stage.

  Removes the specified environment from the pipeline stage. The environment must belong to an inactive pipeline.

EXAMPLES
  Delete an environment:

    $ sf devops stage environment delete --target-org my-devops-org --pipeline-id 0XB000000000001 --environment-id \
      0Xe000000000001

See code: src/commands/devops/stage/environment/delete.ts

sf devops work-item combine

Prepare work items to be combined for custom promotion.

USAGE
  $ sf devops work-item combine -o <value> --parent-work-item-id <value> --child-work-item-id <value>... -t <value> [--json]
    [--flags-dir <value>] [--api-version <value>]

FLAGS
  -o, --target-org=<value>             (required) Username or alias of the target org. Not required if the `target-org`
                                       configuration variable is already set.
  -t, --target-stage-id=<value>        (required) ID of the pipeline stage to promote the combined work item to.
      --api-version=<value>            Override the api version used for api requests made by this command
      --child-work-item-id=<value>...  (required) ID of a work item to combine.
      --parent-work-item-id=<value>    (required) ID of the parent work item.

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  Prepare work items to be combined for custom promotion.

  Use this command when work items in the same stage share metadata or have dependencies. DevOps Center combines the
  selected work items so they can be promoted together during custom promotion.

  After running this command, use "sf devops work-item promote" with the parent work item ID to complete the promotion.
  The combined work items are promoted as a single unit.

EXAMPLES
  Prepare three work items to be combined to prevent conflicts during promotion:

    $ sf devops work-item combine --target-org my-devops-org --parent-work-item-id 0Wx000000000001 \
      --child-work-item-id 0Wx000000000002 --child-work-item-id 0Wx000000000003 --target-stage-id 05S000000000002

FLAG DESCRIPTIONS
  --child-work-item-id=<value>...  ID of a work item to combine.

    Specify this flag multiple times to combine multiple work items with the parent.

  --parent-work-item-id=<value>  ID of the parent work item.

    The parent work item is the primary work item that continues through the pipeline. Changes from all child work items
    are merged into the parent's branch during promotion.

See code: src/commands/devops/work-item/combine.ts

sf devops work-item create

Create a new work item in a DevOps Center project.

USAGE
  $ sf devops work-item create -o <value> -p <value> -s <value> [--json] [--flags-dir <value>] [--api-version <value>] [-d
    <value>]

FLAGS
  -d, --description=<value>  Description of the new work item; if not specified, the description is blank.
  -o, --target-org=<value>   (required) Username or alias of the target org. Not required if the `target-org`
                             configuration variable is already set.
  -p, --project-id=<value>   (required) ID of the DevOps Center project to create the work item in.
  -s, --subject=<value>      (required) Subject (title) of the new work item.
      --api-version=<value>  Override the api version used for api requests made by this command

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  Create a new work item in a DevOps Center project.

  The command creates the work item using the Connect API. Requires a project ID and a subject for the new work item;
  run the `devops project list` command to get the IDs for all existing projects.

EXAMPLES
  Create a work item for the project with the specified ID and give the work item the specified subject (title); use
  the DevOps Center org with alias "my-devops-org":

    $ sf devops work-item create --target-org my-devops-org --project-id 1Qg000000000001 --subject "Fix login bug"

  Create a work item with a subject and description:

    $ sf devops work-item create --target-org my-devops-org --project-id 1Qg000000000001 --subject "Add dark mode" \
      --description "Implement dark mode toggle in settings page"

See code: src/commands/devops/work-item/create.ts

sf devops work-item list

List all work items for a DevOps Center project.

USAGE
  $ sf devops work-item list -o <value> -p <value> [--json] [--flags-dir <value>] [--api-version <value>]

FLAGS
  -o, --target-org=<value>   (required) Username or alias of the target org. Not required if the `target-org`
                             configuration variable is already set.
  -p, --project-id=<value>   (required) ID of the DevOps Center project to list work items for.
      --api-version=<value>  Override the api version used for api requests made by this command

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  List all work items for a DevOps Center project.

  Each work item displays the branch, environment, and repository details needed for checkout and promotion. Requires a
  project ID; run the `devops project list` command to get the IDs for all existing projects.

EXAMPLES
  List work items for a specific project in the DevOps org with alias "my-devops-org":

    $ sf devops work-item list --target-org my-devops-org --project-id 1Qg000000000001

  List work items using JSON output:

    $ sf devops work-item list --target-org my-devops-org --project-id 1Qg000000000001 --json

See code: src/commands/devops/work-item/list.ts

sf devops work-item prepare

Prepare a work item for one-off promotion between pipeline stages.

USAGE
  $ sf devops work-item prepare -o <value> -i <value> -t <value> [--json] [--flags-dir <value>] [--api-version <value>]

FLAGS
  -i, --work-item-id=<value>     (required) ID of the work item to prepare for one-off promotion.
  -o, --target-org=<value>       (required) Username or alias of the target org. Not required if the `target-org`
                                 configuration variable is already set.
  -t, --target-stage-id=<value>  (required) ID of the pipeline stage to promote the work item to.
      --api-version=<value>      Override the api version used for api requests made by this command

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  Prepare a work item for one-off promotion between pipeline stages.

  Prepares a work item for one-off promotion by creating the necessary branches and pull requests in the source control
  repository. Run this command before running "sf devops work-item promote" for a one-off promotion.

  Use "sf devops work-item list" to find the work item ID and target stage ID for a project.

EXAMPLES
  Prepare a work item for one-off promotion to the UAT stage:

    $ sf devops work-item prepare --target-org my-devops-org --work-item-id 0Wx000000000001 --target-stage-id \
      05S000000000002

  Prepare a work item using a DevOps Center org username:

    $ sf devops work-item prepare --target-org [email protected] --work-item-id 0Wx000000000001 \
      --target-stage-id 05S000000000002

See code: src/commands/devops/work-item/prepare.ts

sf devops work-item update

Update a work item in DevOps Center.

USAGE
  $ sf devops work-item update -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [-n <value>] [-w <value>]
    [--subject <value>] [--description <value>] [--status In Progress|Ready to Promote]

FLAGS
  -n, --work-item-name=<value>  Name of the work item, such as WI-000001.
  -o, --target-org=<value>      (required) Username or alias of the target org. Not required if the `target-org`
                                configuration variable is already set.
  -w, --work-item-id=<value>    ID of the work item.
      --api-version=<value>     Override the api version used for api requests made by this command
      --description=<value>     New description for the work item.
      --status=<option>         New status for the work item. Allowed values: "In Progress", "Ready to Promote".
                                <options: In Progress|Ready to Promote>
      --subject=<value>         New subject for the work item.

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  Update a work item in DevOps Center.

  Update the subject, description, or status of a work item. At least one of --subject, --description, or --status must
  be provided.

EXAMPLES
  Update the subject of a work item by name:

    $ sf devops work-item update --target-org my-devops-org --work-item-name WI-000001 --subject "Fix login bug"

  Update the status of a work item by ID:

    $ sf devops work-item update --target-org my-devops-org --work-item-id 0Wx000000000001 --status "In Progress"

  Update multiple fields at once:

    $ sf devops work-item update --target-org my-devops-org --work-item-name WI-000001 --subject "Fix login bug" \
      --description "Users can't log in on mobile" --status "In Progress"

See code: src/commands/devops/work-item/update.ts

sf project deploy pipeline quick

Quickly deploy a validated deployment to an org.

USAGE
  $ sf project deploy pipeline quick -c <value> [--json] [--flags-dir <value>] [--concise | --verbose] [-w <minutes> | --async] [-i
    <value>] [-r]

FLAGS
  -c, --devops-center-username=<value>  (required) Username or alias of the DevOps Center org.
  -i, --job-id=<value>                  Job ID of the validated deployment to quick deploy.
  -r, --use-most-recent                 Use the job ID of the most recently validated deployment.
  -w, --wait=<minutes>                  [default: 33 minutes] Number of minutes to wait for command to complete and
                                        display results.
      --async                           Run the command asynchronously.
      --concise                         Show concise output of the command result.
      --verbose                         Show verbose output of the command result.

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  Quickly deploy a validated deployment to an org.

  The first time you run any "project deploy pipeline" command, be sure to authorize the org in which DevOps Center is
  installed. The easiest way to authorize an org is with the "org login web" command.

  Before you run this command, create a validated deployment with the "project deploy pipeline validate" command, which
  returns a job ID. Validated deployments haven't been deployed to the org yet; you deploy them with this command.
  Either pass the job ID to this command or use the --use-most-recent flag to use the job ID of the most recently
  validated deployment. For the quick deploy to succeed, the associated validated deployment must also have succeeded.

  Executing this quick deploy command takes less time than a standard deploy because it skips running Apex tests. These
  tests were previously run as part of the validation. Validating first and then running a quick deploy is useful if the
  deployment to your production org take several hours and you don’t want to risk a failed deploy.

  This command doesn't support source-tracking. The source you deploy overwrites the corresponding metadata in your org.
  This command doesn’t attempt to merge your source with the versions in your org.

EXAMPLES
  Run a quick deploy using your default Devops Center org and a job ID:

    $ sf project deploy pipeline quick --job-id 0Af0x000017yLUFCA2

  Asynchronously run a quick deploy of the most recently validated deployment using an org with alias "my-prod-org":

    $ sf project deploy pipeline quick --async --use-most-recent --devops-center-username my-prod-org

FLAG DESCRIPTIONS
  -i, --job-id=<value>  Job ID of the validated deployment to quick deploy.

    The job ID is valid for 10 days from when you started the validation.

  -r, --use-most-recent  Use the job ID of the most recently validated deployment.

    For performance reasons, this flag uses only job IDs that were validated in the past 3 days or less. If your most
    recent deployment validation was more than 3 days ago, this flag won't find the job ID.

  -w, --wait=<minutes>  Number of minutes to wait for command to complete and display results.

    If the command continues to run after the wait period, the CLI returns control of the terminal window to you and
    returns the job ID. To check the status of the operation, run "sf project deploy pipeline report".

  --async  Run the command asynchronously.

    The command immediately returns the job ID and control of the terminal to you. This way, you can continue to use the
    CLI. To resume the deployment, run "sf project deploy pipeline resume". To check the status of the deployment, run
    "sf project deploy pipeline report".

See code: src/commands/project/deploy/pipeline/quick.ts

sf project deploy pipeline report

Check the status of a pipeline deploy operation.

USAGE
  $ sf project deploy pipeline report -c <value> [--json] [--flags-dir <value>] [-i <value>] [-r]

FLAGS
  -c, --devops-center-username=<value>  (required) Username or alias of the DevOps Center org.
  -i, --job-id=<value>                  Job ID of the pipeline deployment to check the status of.
  -r, --use-most-recent                 Use the job ID of the most recent deploy operation.

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  Check the status of a pipeline deploy operation.

  The first time you run any "project deploy pipeline" command, be sure to authorize the org in which DevOps Center is
  installed. The easiest way to authorize an org is with the "org login web" command.

  Run this command by either indicating a job ID or specifying the —use-most-recent flag to use the job ID of the most
  recent deploy operation.

EXAMPLES
  Check the status using a job ID:

    $ sf project deploy pipeline report --devops-center-username MyStagingSandbox --job-id 0Af0x000017yLUFCA2

  Check the status of the most recent deploy operation:

    $ sf project deploy pipeline report --devops-center-username MyStagingSandbox --use-most-recent

FLAG DESCRIPTIONS
  -i, --job-id=<value>  Job ID of the pipeline deployment to check the status of.

    The job ID is valid for 10 days from when you started the deploy operation.

  -r, --use-most-recent  Use the job ID of the most recent deploy operation.

    For performance reasons, this flag uses job IDs for deploy operations that started in the past 3 days or fewer. If
    your most recent operation was longer than 3 days ago, this flag won't find the job ID.

See code: src/commands/project/deploy/pipeline/report.ts

sf project deploy pipeline resume

Resume watching a pipeline deploy operation.

USAGE
  $ sf project deploy pipeline resume -c <value> [--json] [--flags-dir <value>] [-i <value>] [-r] [--concise | --verbose] [-w
    <minutes> | ]

FLAGS
  -c, --devops-center-username=<value>  (required) Username or alias of the DevOps Center org.
  -i, --job-id=<value>                  Job ID of the pipeline deploy operation you want to resume.
  -r, --use-most-recent                 Use the job ID of the most recent deploy operation.
  -w, --wait=<minutes>                  [default: 33 minutes] Number of minutes to wait for command to complete and
                                        display results.
      --concise                         Show concise output of the command result.
      --verbose                         Show verbose output of the command result.

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  Resume watching a pipeline deploy operation.

  The first time you run any "project deploy pipeline" command, be sure to authorize the org in which DevOps Center is
  installed. The easiest way to authorize an org is with the "org login web" command.

  Use this command to resume watching a pipeline deploy operation if the original command times out or you specified the
  --async flag.

  Run this command by either indicating a job ID or specifying the --use-most-recent flag to use the job ID of the most
  recent deploy operation.

EXAMPLES
  Resume watching a deploy operation using a job ID:

    $ sf project deploy pipeline resume --job-id 0Af0x000017yLUFCA2

  Resume watching the most recent deploy operation:

    $ sf project deploy pipeline resume --use-most-recent

FLAG DESCRIPTIONS
  -i, --job-id=<value>  Job ID of the pipeline deploy operation you want to resume.

    These commands return a job ID if they time out or you specified the --async flag:

    - sf project deploy pipeline start
    - sf project deploy pipeline validate
    - sf project deploy pipeline quick

    The job ID is valid for 10 days from when you started the deploy operation.

  -r, --use-most-recent  Use the job ID of the most recent deploy operation.

    For performance reasons, this flag uses job IDs for operations that started in the past 3 days or fewer. If your
    most recent operation was longer than 3 days ago, this flag won't find a job ID.

  -w, --wait=<minutes>  Number of minutes to wait for command to complete and display results.

    If the command continues to run after the wait period, the CLI returns control of the terminal window to you and
    returns the job ID. To check the status of the operation, run "sf project deploy pipeline report".

See code: src/commands/project/deploy/pipeline/resume.ts

sf project deploy pipeline start

Deploy changes from a branch to the pipeline stage’s org.

USAGE
  $ sf project deploy pipeline start -b <value> -p <value> -c <value> [--json] [--flags-dir <value>] [-v <value>] [-a] [-t
    <value>...] [-l NoTestRun|RunSpecifiedTests|RunLocalTests|RunAllTestsInOrg] [-w <minutes> | --async] [--concise |
    --verbose]

FLAGS
  -a, --deploy-all                          Deploy all metadata in the branch to the stage's org.
  -b, --branch-name=<value>                 (required) Name of the branch in the source control repository that
                                            corresponds to the pipeline stage that you want to deploy the changes to.
  -c, --devops-center-username=<value>      (required) Username or alias of the DevOps Center org.
  -l, --test-level=<option>                 Deployment Apex testing level.
                                            <options: NoTestRun|RunSpecifiedTests|RunLocalTests|RunAllTestsInOrg>
  -p, --devops-center-project-name=<value>  (required) Name of the DevOps Center project.
  -t, --tests=<value>...                    Apex tests to run when --test-level is RunSpecifiedTests.
  -v, --bundle-version-name=<value>         Version name of the bundle.
  -w, --wait=<minutes>                      [default: 33 minutes] Number of minutes to wait for command to complete and
                                            display results.
      --async                               Run the command asynchronously.
      --concise                             Show concise output of the command result.
      --verbose                             Show verbose output of the command result.

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  Deploy changes from a branch to the pipeline stage’s org.

  The first time you run any "project deploy pipeline" command, be sure to authorize the org in which DevOps Center is
  installed. The easiest way to authorize an org is with the "org login web" command.

  Before you run this command, changes in the pipeline stage's branch must be merged in the source control repository.

EXAMPLES
  Deploy changes in the Staging branch to the Staging environment (sandbox), if the previous stage is the bundling
  stage:

    $ sf project deploy pipeline start --devops-center-project-name “Recruiting App” --branch-name staging \
      --devops-center-username MyStagingSandbox --bundle-version-name 1.0

  Deploy all changes in the main branch to the release environment:

    $ sf project deploy pipeline start --devops-center-project-name “Recruiting App” --branch-name main \
      --devops-center-username MyReleaseOrg --deploy-all

FLAG DESCRIPTIONS
  -a, --deploy-all  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.

  -l, --test-level=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.

    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)

  -t, --tests=<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.

  -v, --bundle-version-name=<value>  Version name of the bundle.

    You must indicate the bundle version if deploying to the environment that corresponds to the first stage after the
    bundling stage.

  -w, --wait=<minutes>  Number of minutes to wait for command to complete and display results.

    If the command continues to run after the wait period, the CLI returns control of the terminal window to you and
    returns the job ID. To check the status of the operation, run "sf project deploy pipeline report".

  --async  Run the command asynchronously.

    The command immediately returns the job ID and control of the terminal to you. This way, you can continue to use the
    CLI. To resume the deployment, run "sf project deploy pipeline resume". To check the status of the deployment, run
    "sf project deploy pipeline report".

See code: src/commands/project/deploy/pipeline/start.ts

sf project deploy pipeline validate

Perform a validate-only deployment from a branch to the pipeline stage’s org.

USAGE
  $ sf project deploy pipeline validate -b <value> -p <value> -c <value> [--json] [--flags-dir <value>] [-v <value>] [-a] [-t
    <value>...] [-l NoTestRun|RunSpecifiedTests|RunLocalTests|RunAllTestsInOrg] [-w <minutes> | --async] [--concise |
    --verbose]

FLAGS
  -a, --deploy-all                          Deploy all metadata in the branch to the stage's org.
  -b, --branch-name=<value>                 (required) Name of the branch in the source control repository that
                                            corresponds to the pipeline stage that you want to deploy the changes to.
  -c, --devops-center-username=<value>      (required) Username or alias of the DevOps Center org.
  -l, --test-level=<option>                 Deployment Apex testing level.
                                            <options: NoTestRun|RunSpecifiedTests|RunLocalTests|RunAllTestsInOrg>
  -p, --devops-center-project-name=<value>  (required) Name of the DevOps Center project.
  -t, --tests=<value>...                    Apex tests to run when --test-level is RunSpecifiedTests.
  -v, --bundle-version-name=<value>         Version name of the bundle.
  -w, --wait=<minutes>                      [default: 33 minutes] Number of minutes to wait for command to complete and
                                            display results.
      --async                               Run the command asynchronously.
      --concise                             Show concise output of the command result.
      --verbose                             Show verbose output of the command result.

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  Perform a validate-only deployment from a branch to the pipeline stage’s org.

  The first time you run any "project deploy pipeline" command, be sure to authorize the org in which DevOps Center is
  installed. The easiest way to authorize an org is with the "org login web" command.

  A validation runs Apex tests to verify whether a deployment will succeed without actually deploying the metadata to
  your environment, so you can then quickly deploy the changes later without re-running the tests.

EXAMPLES
  Perform a validate-only deployment from the Staging branch to the Staging environment (sandbox):

    $ sf project deploy pipeline validate --devops-center-project-name “Recruiting App” --branch-name staging \
      --devops-center-username MyStagingSandbox

  Perform a validate-only deployment of all changes from the main branch to the release environment:

    $ sf project deploy pipeline validate --devops-center-project-name “Recruiting App” --branch-name main \
      --devops-center-username MyReleaseOrg --deploy-all

FLAG DESCRIPTIONS
  -a, --deploy-all  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.

  -l, --test-level=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.

    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)

  -t, --tests=<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.

  -v, --bundle-version-name=<value>  Version name of the bundle.

    You must indicate the bundle version if deploying to the environment that corresponds to the first stage after the
    bundling stage.

  -w, --wait=<minutes>  Number of minutes to wait for command to complete and display results.

    If the command continues to run after the wait period, the CLI returns control of the terminal window to you and
    returns the job ID. To check the status of the operation, run "sf project deploy pipeline report".

  --async  Run the command asynchronously.

    The command immediately returns the job ID and control of the terminal to you. This way, you can continue to use the
    CLI. To resume the deployment, run "sf project deploy pipeline resume". To check the status of the deployment, run
    "sf project deploy pipeline report".

See code: src/commands/project/deploy/pipeline/validate.ts

sf project deploy pipeline start

Deploy changes from a branch to the pipeline stage’s org.

USAGE
$ sf project deploy pipeline start [--json] [-c <value>] [-p <value>] [-b <value>] [-v <value>] [-a] [--async | -w <value>] [--concise | --verbose]
    [-t <value>] [-l NoTestRun|RunSpecifiedTests|RunLocalTests|RunAllTestsInOrg]

FLAGS
  -a, --deploy-all                                Deploy all metadata in the branch.
  -b, --branch-name=<value>                       Name of the branch in the source control repository from which to deploy changes to the stage’s org.
  -c, --devops-center-username=<value>            Username or alias for the DevOps Center org.
  -l, --test-level=<option>                       [default: NoTestRun] Deployment Apex testing level.
                                                  <options: NoTestRun|RunSpecifiedTests|RunLocalTests|RunAllTestsInOrg>
  -p, --devops-center-project-name=<value>        Name of the DevOps Center project.
  -t, --tests=<value>...                          Apex tests to run when --test-level is RunSpecifiedTests.
  -v, --bundle-version-name=<value>               Version name of the bundle.
  -w, --wait=<minutes>                            Number of minutes to wait for command to complete and display results.
  --async                                         Run the command asynchronously.
  --concise                                       Show concise output of the deploy result.
  --verbose                                       Show verbose output of the deploy result.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
Before you run this command, changes in the branch must be merged in the source control repository.

EXAMPLES
Deploy changes in the Staging branch to the Staging environment (sandbox), if the previous stage is the bundling stage:

  $ sf project deploy pipeline start —-devops-center-project-name “Recruiting App” —-branch-name staging —-devops-center-username MyStagingSandbox —-bundle-version-name 1.0

Deploy all changes in the main branch to the release environment:

  $ sf project deploy pipeline start —-devops-center-project-name “Recruiting App” —-branch-name main —-devops-center-username MyReleaseOrg —-deploy-all

FLAG DESCRIPTIONS
-a, --deploy-all  Deploy all metadata in the branch

  If you don’t specify this flag, only changes in the stage’s branch are deployed.

-b, --branch-name=<value> Name of the branch in the source control repository from which to deploy changes to the stage’s org.

-c, --devops-center-username=<value> Username or alias for the DevOps Center org.

-l, --test-level=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 --run-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.

    If you don’t specify a test level, the default behavior depends on the contents of your deployment package. For more
    information, see [Running Tests in a
    Deployment](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_deploy_running_tests.htm)
    in the "Metadata API Developer Guide".

-p, --devops-center-project-name=<value> Name of the DevOps Center project.

-t, --tests=<value>... Apex tests to run when --test-level is RunSpecifiedTests.

  Separate multiple test names with commas, and enclose the entire flag value in double quotes if a test contains a space.

-v, --bundle-version-name=<value> Version name of the bundle

  You must indicate the bundle version if deploying to the environment that corresponds to the first stage after the bundling stage.

-w, --wait=<minutes> Number of minutes to wait for command to complete and display results.

  If the command continues to run after the wait period, the CLI returns control of the terminal window to you and returns the job ID.
  To check the status of the deploy operation, run "sf project deploy pipeline report".

--async  Run the command asynchronously.

  The command immediately returns the job ID and control of the terminal to you. This way, you can continue to use the CLI. To resume the deployment,
  run "sf project deploy pipeline resume". To check the status of the deployment, run "sf project deploy pipeline report".

sf project deploy pipeline report

Check the status of a pipeline deploy operation.

USAGE
  $ sf project deploy pipeline report [--json] [-c <value>] [-i <value>] [-r]

FLAGS
  -c, --devops-center-username=<value>  Username or alias for the DevOps Center org.
  -i, --job-id=<value>                  Job ID of the pipeline deployment you want to check the status of.
  -r, --use-most-recent                 Use the job ID of the most recent deploy operation.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Check the status of a pipeline deploy operation.

  Run this command by either passing it a job ID or specifying the —use-most-recent flag to use the job ID of the most recent deploy operation.

EXAMPLES
  Check the status using a job ID:

    $ sf project deploy pipeline report --devops-center-username MyStagingSandbox --job-id 0Af0x000017yLUFCA2

  Check the status of the most recent deploy operation:

    $ sf project deploy pipeline report --devops-center-username MyStagingSandbox --use-most-recent

FLAG DESCRIPTIONS
  -c, --devops-center-username=<value> Username or alias for the DevOps Center org.

  -i, --job-id=<value>  Job ID of the pipeline deployment you want to check the status of.

      The job ID is valid for 10 days from when you started the deploy operation.

  -r, --use-most-recent  Use the job ID of the most recent deploy operation.

      For performance reasons, this flag uses job IDs for deploy operations that started in the past 3 days or fewer. If your most recent operation was longer than 3 days ago, this flag won't find a job ID.

sf project deploy pipeline resume

Resume watching a pipeline deploy operation.

  USAGE
    $ sf project deploy pipeline resume [--json] [-c <value>] [-i <value>] [-r] [-w <value>] [--concise | --verbose]

  FLAGS
    -c, --devops-center-username=<value>  Username or alias of the DevOps Center org.
    -i, --job-id=<value>                  Job ID of the pipeline deploy operation you want to resume.
    -r, --use-most-recent                 Use the job ID of the most recent deploy operation.
    -w, --wait=<minutes>                  Number of minutes to wait for command to complete and display results.
    --concise                             Show concise output of the deploy result.
    --verbose                             Show verbose output of the deploy result.

  GLOBAL FLAGS
    --json  Format output as json.

  DESCRIPTION
    Resume watching a pipeline deploy operation.

    Use this command to resume watching a pipeline deploy operation if the original command times out or you specified the --async flag.
    Run this command by either passing it a job ID or specifying the --use-most-recent flag to use the job ID of the most recent deploy operation.

  EXAMPLES
    Resume watching a deploy operation using a job ID:

      $ sf project deploy pipeline resume --job-id 0Af0x000017yLUFCA2

    Resume watching the most recent deploy operation:

      $ sf project deploy pipeline resume --use-most-recent

  FLAG DESCRIPTIONS
    -i, --job-id=<value>  Job ID of the pipeline deploy operation you want to resume.

      These commands return a job ID if they time out or you specified the --async flag:

      - sf project deploy pipeline start
      - sf project deploy pipeline validate
      - sf project deploy pipeline quick

      The job ID is valid for 10 days from when you started the deploy operation.

    -r, --use-most-recent  Use the job ID of the most recent deploy operation.

      For performance reasons, this flag uses job IDs for operations that started in the past 3 days or fewer. If your most recent operation was longer than 3 days ago, this flag won't find a job ID.

    -w, --wait=<minutes>  Number of minutes to wait for command to complete and display results.

      If the command continues to run after the wait period, the CLI returns control of the terminal window to you and returns the job ID. To check the status of the operation, run "sf project deploy pipeline report".

About

The DevOps Center CLI plugin provides a command-line alternative to performing equivalent actions in the DevOps Center graphical UI

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages