Implementing Copado Branch Management

Updated 4 months ago by David Venegas

When implementing the Copado Branch Management application in a busy set of environments, there are 3 typical processes that you can choose to follow:

Short involvement (All sandbox refresh):

  1. Release all your pending changes in all sandboxes (UAT, Integration, Dev) to Production. You can release the changes by using the Copado Deployments functionality.
  2. Refresh all the sandboxes
  3. Setup the Copado Branch Management flow and create all Git branches out of the master branch
  4. Start working with the Copado Branch Management and Change Management process with user stories


Intermediate involvement (Middle sandbox refresh):

  1. Release all your pending changes of the middle environments (UAT, Integration) to Production (Dev sandboxes with pending work should be left as is).
  2. Refresh the middle sandboxes (UAT, Integration). If there are Dev sandboxes with little or no work in progress, refresh them too.
  3. Setup the Copado Deployment flow and create all the branches out of master
  4. Commit the pending work of the Dev environments in user stories with changes. that are not yet in Integration.
  5. Compare the dev feature branches against the target branch (with the pull request feature). 
    1. Be aware that the Dev sandboxes can be out of Sync, make sure the committed changes will not revert previous changes in Integration. If in the pull request you identify that previous changes in Integration are reverted, re add them in the Dev Sandbox and recommit these components in their corresponding user stories.
  6. Continue promoting and deploying the user stories all the way to Production with the Copado Branch Management and Change Management process.
During the first steps of the process, developers and admins can continue working on their sandboxes, but changes should not be deployed forward until after you reach step 5.

 

Long involvement (No sandbox refresh):

  1. Setup the flow with Production and UAT environments and create the uat branch out of master. 
  2. Commit UAT changes in one or more user stories that are not yet in Production*
  3. Include the Integration environment and create the integration branch out of UAT (it will contain the UAT changes) in your flow.
  4. Commit the Integration changes in one or more user stories that are not yet in UAT*
  5. Include the dev environments in the flow and create their branches out of the integration branch (the dev branches will contain the integration changes + UAT changes).
  6. Commit the pending work of the Dev environments in user stories with changes that are not yet in Integration. 
  7. Compare the dev feature branches against the target branches (with the pull request feature). 
    1. Be aware that the Dev sandboxes can be out of Sync, make sure the committed changes do not revert previous changes in Integration. If previous changes are reverted, re add them in the Dev Sandbox and recommit these components in their corresponding user stories.
  8. Continue promoting and deploying the user stories all the way to Production with the Copado Branch Management and Change Management process.

*Exclude user stories created in UAT and Integration from CBM, to avoid back porting them to the dev sandboxes. You can exclude them by checking the "Exclude from CBM" checkbox in the user story layout.

During the first steps of the process, developers and admins can continue working on their sandboxes, but changes should not be deployed forward until after you reach step 7.


If there is no track of metadata changes in the different sandboxes, leverage the Org Differences and Snapshot Differences feature of Copado to compare the metadata differences between the Production Org and UAT/Int/Dev sandboxes.

Alternatively, the Git Snapshot feature lets you commit the metadata of all your environments into different branches of a Git repository. Once all the metadata of the different environments is committed in the branches,  create pull requests between the branches to compare the differences.


How did we do?