Copado Git and Change Management Setup Steps

Updated 11 months ago by Iván Minaya

The Copado Git and Change Management setup will let you achieve the best practice in release management. With this setup you'll be able to control your user stories and their metadata changes as they move through your environment landscape until they finally reach the production environment. 

By following the steps below you'll experience setting up your Deployment/Release flow, creating user stories, adding metadata/committing files to each user story and promoting the them to the next environment, as defined in your release flow.  

  1. Check that the IP Addresses of Copado and of your Git Service Provider (E. g. GitHub, Bitbucket, etc.) are enabled/whitelisted in your firewall and in your Salesforce network settings.
  2. Add your Org Credentials
  3. Create an API Key for enabling the Webhooks functionality.

Copado Branch Management

  1. Setup your deployment flow using the Copado Branch Management application.
    • A pre-requisite is to have a Git Repository with one branch per each environment in your deployment flow. All branches must start in sync, meaning, they must be in the same commit Id. Integrate your Git Repository and link each Org Credential to a specific repository branch using Git Snapshots
  2. Once the deployment flow is set (all the environments are connected and they have specific branches set), click on the button "Manage Branches" and in the popup window click on "Recalculate". After the calculation is finished, all the environments should be "Synced" with each other.

Copado Change Management

  1. Create a new Project and link it to your deployment flow.
  2. Create a User Story.
    • In the Project field select your new project.
    • In the Environment field select the development environment where you will develop the user story. This environment has to be present in your project's deployment flow. 
    • Click Save.
  3. Commit files within the User Story. Select a couple metadata components for testing purposes.
  4. Edit the user story and check true the "Promote Change" checkbox.*
  5. Create a Promotion:
    • In the Project field select your Project.
    • In the Source Environment field select the user story's development environment.
    • In the Source Org Credential field select the user story's development Org Credential.
    • Click Save.
    • The user story should appear in the bottom, select it and click "Add Selected User Stories".
    • The user story will move to the right. Select it again and click "Create Deployment". Click Submit.
    • A new deployment will appear in the Deployments related list. Click on it and you'll be redirected to the Deployment detail page.
  6. In the Deployment detail page you'll notice that there's a source Org and a corresponding destination Org (as defined in your deployment flow).
    • Click on the Metadata Step. A table will appear with the metadata components that were committed, which will be deployed to the destination Org.
  7. When the deployment is finished, check the following changes:
    • In the Destination Org you will find that the metadata components were successfully deployed.
    • In the repository branch linked to the destination Org, you'll see that the user story files were recently merged.
    • If you open the user story, you'll see that the Environment has changed from the original value to the destination Environment. Now this user story can be tested again in the new Org, and whenever it's ready to be promoted to the next environment, just repeat the Promotion process. 
    • Go to your deployment flow. Click on the button "Manage Branches". Then click recalculate. Once the calculation is finished, you will see the updated status of your flow.**

In Copado v6.0, there's a new checkbox called "Promote and Deploy", which promoted and deploys the user story automatically. Therefore the Step 5 (Create a Promotion) will be done automatically for you. Be aware that by checking "Promote and Deploy", only this user story will be promoted. With "Promote Change", you'll be able to promote multiple user stories in Step 5. Since Copado v7.0, Change Management users can promote and deploy user stories linked to a Branch Management deployment flow.

**In "Manage Branches", click on Show Webhook URL. If you copy this link and add it in your Git Repository's webhook notifications, then, Copado will be notified every time there's a commit or merge in your repository, and will start the deployment flow Calculation for you automatically.

The following diagram lays out the steps to achieve the best practice for your Salesforce release management strategy:

How did we do?