Promotion Deploy Action
The Promotion Deploy action is one of the standard Copado actions and is responsible for two processes:
- Merging the feature branches of the user stories included in the promotion.
- Reporting merge conflicts and resolving them.
- Preparing the merge information for the deployment action.
- Deploying the changes to the destination environment.
- Merging the promotion branch with the branch of the destination environment if the deployment is successful.
Like all other standard actions, it is divided into three parts:
- An Apex invocable method. This method is responsible for the following actions:
- Creating the Promotion record and linking the user stories to it.
- Generating the DataJson field in the Job Execution record.
- Preparing a json file with a list of all the metadata included in the user stories.
- An execution process that consists of a deployment job template that includes the function that will perform the action.
- The job callback which can apply some custom logic (for instance, updating a field) when the job execution ends.
How and where is the promotion deploy action triggered? The promotion deploy action can be executed in multiple scenarios. Let’s take a look at some of these options.
Using the Merge & Deploy Changes button.
Flagging the Promote & Deploy checkbox.
Using the sfdx copado:work:submit -d command.
For more information about how the deployment process works, review the article Deployment Process in Multi-Cloud.