Loading
Salesforce now sends email only from verified domains. Read More
Manage and Release Changes Easily and Collaboratively with DevOps...
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Deploy Changes Using Salesforce CLI (Beta)

          Deploy Changes Using Salesforce CLI (Beta)

          Use Salesforce CLI to deploy changes to a pipeline stage’s environment or to perform a validate-only deployment. You must externally merge any changes in the source control repository before you can perform the deployment using the CLI. While the CLI command runs, you can see the progress of the promotion reflected in the DevOps Center Pipeline Stages tab.

          Note
          Note This feature is a Beta Service. Customer may opt to try such Beta Service in its sole discretion. Any use of the Beta Service is subject to the applicable Beta Services Terms provided at Agreements and Terms.

          The DevOps Center CLI plugin is compatible with DevOps Center package version 6.0 or later. The DevOps Center plugin (plugin-devops-center) is installed the first time you run a CLI command. To install and configure the CLI, see the Salesforce CLI Setup Guide.

          Salesforce CLI releases on a weekly basis. See the Salesforce CLI Release Notes for information on the timing for the official release of the DevOps Center plugin.

          The CLI commands for DevOps Center include:

          Command Description
          project deploy pipeline start Deploy changes from a branch to the pipeline stage’s org.
          project deploy pipeline report Check the status of a pipeline deployment operation.
          project deploy pipeline resume Resume watching a pipeline deployment operation.
          project deploy pipeline validate Perform a validate-only deployment from a branch to the pipeline stage’s org. You can create a validation for only the bundling stage and versioned stages.
          project deploy pipeline quick Quickly deploy a validated deployment to an org.

          To see all command options, you can view help directly in a terminal or command window. Append --help to the command name. In this example, all project deploy pipeline commands are listed:

          sf project deploy pipeline --help

          To view condensed help for a command, use the -h flag. For detailed information on all CLI commands, see the Salesforce CLI Command Reference.

          To use the DevOps Center CLI commands, you must:

          • Be assigned the DevOps Center Release Manager permission set. This permission set enables you to perform promotions. Ask a Salesforce admin or project manager for assistance.
          • Authorize the org in which DevOps Center is installed. The easiest way to authorize an org is with the org login web command. See Authorization in the Salesforce DX Developer Guide for details.

          The following examples demonstrate how to deploy changes to a pipeline stage’s environment using Salesforce CLI. First, changes must be merged to a pipeline stage branch directly in the source control repository. When the pipeline deploy command is run, all externally merged changes are deployed to the corresponding pipeline stage environment.

          Tip
          Tip To avoid having to indicate the --devops-center-username each time you run a DevOps Center CLI command, you can set it using a configuration variable. See target-devops-center in the Salesforce CLI Setup Guide: Configuration Variables for details.

          In these examples, line breaks are added for readability purposes.

          In this first example, several work item feature branches were merged to the Integration branch. To deploy the changes from the Integration branch to the Integration environment:

          sf project deploy pipeline start --branch-name recruit-integration 
          --devops-center-username MyDevOpsCenterOrg --devops-center-project-name "Recruiting App"

          In this example, UAT is the bundling stage, which means that you indicate a version identifier. To deploy all merged changes in a version 1.0 bundle to the UAT environment:

          sf project deploy pipeline start --branch-name recruit-uat --devops-center-username 
          MyDevOpsCenterOrg --devops-center-project-name "Recruiting App" --bundle-version-name 1.0

          In this example, you’re ready to validate the changes in the Staging branch so you can perform a quick deployment to production. When ready, you can perform the quick deployment in DevOps Center Pipeline Stages. To run a validate-only deployment:

          sf project deploy pipeline validate --branch-name recruit-staging --devops-center-username 
          MyDevOpsCenterOrg --test-level RunLocalTests --devops-center-project-name "Recruiting App"
           
          Loading
          Salesforce Help | Article