In most of the Organizations, One would need certain approvals before a build can be promoted to one of the release environments. In Azure DevOps, it has always been easy to configure the approvers by configuring the pre-deployment settings in the stage. However, it was not possible to do it for the YAML based pipelines up until now. As we discussed in our previous blog post on how to write multi stage pipelines, we also discussed about the environments. Environments are a very new feature and they represent the group of resources targeted by a pipeline, for example, Kubernetes clusters, Azure Web Apps, virtual machines, and databases.
To add approvers for an release stage, we need to go to associated environments, click on ‘Checks’:
After this, Click ‘Create’ next to the ‘Add Manual Approvals’:
In the pop-up window shown, Select and add the designated persons and click ‘Create’ once done:
You can also optionally add a message which may be useful to the approvers.
Now, if you trigger the pipeline again, it will wait for the sign off from the approvers defined: