Copado Branch Management Application: How Does It Work?
The deployment flow (with Git repository and branch information) is set up within Copado. A Copado webhook is also added to your Git repository. Every time a commit is received by the Git repository, the commit information is sent to Copado where the following will occur:
- The Git repository is retrieved and the branch divergence will be calculated (commits ahead and behind).
- A local merge (ahead) or pull (behind) of the diverged commits will be attempted between a branch (e.g. Dev2) and its parent branch (in this case Staging).
- If the merge succeeds, a validation-only deployment of the merged content is created (e.g. validation deployment into the Dev1 org).If it fails, the error information will be displayed.
- You will be able to see if the validation deployment succeeded or failed as well as the errors if it failed.
- The differences between the branches of the files affected will be available for comparison.
- If the validation deployment was successful, you can choose to perform a sync (e.g. Staging content into Dev1). If you click on the Sync button, the deployment is executed (Staging content into the Dev1 org), and only if it is successful, the Staging commit is merged into the destination branch (e.g. Dev1) and the changes are pushed to your Git repository.
Best Practices Tip
Always sync back to lower environments before pushing to production, or once the deployment has been done to production. No new user story feature branch can be created until its environment has been synced. This is to prevent the feature branch from inheriting the latest changes to production into the feature and orgs branch without having actually synced them.