Creating a Deployment

Updated 1 month ago by Copado Solutions

Creating a Deployment from the Deployments Tab

Deployments are managed by Copado's Deployment object and can be accessed using the Deployments tab.

With a one-page deployment screen you can create a deployment and add destination orgs and deployment steps to the deployment without leaving the page.

Creating a deployment with Copado is a 4-step process:

  1. Navigate to the Deployments tab.
  2. Click on New.
    Prior to creating a deployment, you should have created the source org credentials and the destination org credentials. Estimations are cached for a few minutes for performance reasons, therefore they might not reflect the latest changes. Estimations may not be 100% accurate.
    When deploying from Git, you don't need to choose a source org unless you need to combine other steps that are not Git metadata.
  3. Fill in the Information and Steps sections.
  4. Click on Save.

When you manually create the deployment, Copado won’t automatically start the deployment process. In order to execute the deployment, open the Deployment record and click on Deploy. Then click on Deploy All/Deploy Outstanding to start the deployment process.

Creating a Deployment from a User Story

To create a deployment from a user story you can use the Promote & Deploy checkbox. By flagging it, Copado will trigger the creation of a Promotion and a Deployment record and will execute the deployment.

Creating a Deployment from a Promotion

When clicking on Create Deployment, a menu will appear requesting you to confirm the deployment options. Upon saving the deployment, several actions will be triggered:

  • A new promotion branch will be created out of the destination branch and will be named promotion/{}. Once created, Copado will merge every feature branch for each user story promoted.  
  • Copado will create one single Git promotion step in the deployment.
  • Any manual steps that were specified in the user story will also be added to the deployment.
If the deployment option Validation Only is checked, the deployment steps will be set as Check Only. When creating a Validation-Only deployment, deployment tasks in the user stories as well as full profile and full permission set steps will not be created.

Shallow fetch depth in Git can be configured by adding @gitDepth=XXX to the name of the Deployment record created from the promotion, where XXX is the depth of the history of commits that are used, e.g. @gitDepth=200@gitDepth=500@gitDepth=1000.

@gitDepth is case sensitive.

Once the deployment has been completed successfully:

  • The promotion branch will be automatically merged into the destination branch, which is the branch related to the destination org in the CBM pipeline. If the deployment’s name contains :tag=x.y.z, Copado will create and push a Tag x.y.z. Tags cannot be duplicated, therefore the tag is typically added when deploying to production and merging into master.
  • The user stories in the promotion to which the deployment is linked will be moved to the next environment in the pipeline.
  • The checkboxes Promote Change and Promote and Deploy will be unchecked.
Validation deployments will not cause any update in the user stories.

Relevant Fields in the Create Deployment Details Modal

  • Deployment Name: By default the name given to the deployment is “Deploy - {Promotion Name} => {Destination Environment Name}”. This can be edited afterwards.
  • Validation Only: If checked, Copado will also create a promotion branch in your repository, however the deployment step will be set as Check Only. As a result, no changes will be merged towards the destination branch, and it will not lead to any updates in the user stories environment.
  • Test Level: It will define the test level for the deployment.
  • Combine Git and Metadata selections (as Metadata): Git selections will be treated as metadata, creating a single metadata deployment step.
If the user stories in your promotion include components that were added using a commit (Add Commits or Commit Changes operation), the deployment step created will be a MetaData step that will contain the entire file where the components are included. This deployment will not merge feature branches, and Copado will not deploy incremental changes but the entire file.

How did we do?