User Story - Deployment Tasks
Deployment Tasks Overview
A deployment task is an action you can add to a user story for it to be executed every time the user story is deployed to an org. This task is added to the deployment record as a deployment step and it’s positioned either before or after the Git Promotion / MetaData deployment step. Depending on the kind of action you want to execute, there are several types of deployment tasks you can create together with their equivalent deployment steps:
When a user story is deployed to the next environment, the tasks included in that user story are converted into the equivalent deployment steps.
You can add several deployment tasks to a user story. The list of user story tasks shows the Order, Type and Status fields, and tasks are sorted by order:
Copado also allows you to add attachments to deployment tasks. This way, it is easier to find related attachments when all tasks are combined in a promotion:
The Owner field in manual deployment tasks allows you to assign the task to a user, that can be notified via chatter, email or both, so your deployments won't get stuck again awaiting manual intervention.
In manual tasks, you can also select the environments to which the task should be applied in the Apply to picklist field. You can choose to apply a manual task to all the environments in the pipeline or to specific environments. If you don’t specify anything, the task is applied by default in all environments. Additionally, you can specify whether the task should apply or not to back-promotions. If you don’t want to enforce a particular manual task on back-promotions, simply select the Disable Task for Back-Promotions checkbox.
How to Create a Deployment Task
To create a deployment task, follow the steps below:
- Navigate to a User Story record.
- Click on Related and navigate to the Deployment Tasks related list.
- Click on New and select an option from the Type drop-down menu:
- Fill in all other relevant fields and click on Save.
Deployment Tasks Order
When you add several deployment tasks to a user story, each task has an order number, which indicates the order in which they will be executed once the user story is deployed. When you have multiple user stories with deployment tasks in a promotion, the order is based on the user story number, that is, the tasks on the user story with the lowest number are executed first. Let’s take a look at the chart below to see how this works:
As you can see in the chart above, when the promotion deployment is executed, the user story tasks are converted into deployment steps. These steps are then deployed following the user story merge order and the deployment task order within each user story. The tasks from US-0000005 get deployed first and those from US-0000010 get deployed last.