I have a pipeline that is automatically building and deploying code to my staging environment. For my production environment I have a pre-deployment manual approval gate so that only releases that have gone through some review will go out to customers. So far so good.
The problem is that as new releases go out to the staging environment there is a growing list of releases that are now queued for this manual approval. In order to release the most recent version I need to go and manually reject each of the intermediate releases. This has become a laborious process.
I would like to automatically reject the production deploy of the previous release every time a new release goes to staging.
I've looked at the MS docs, SO, the pipeline settings, the available pipeline release tasks and can't find a way to do this.
Release History showing old release queued for approval:
Looks like this behavior can be controlled by making a change in the Deployment Queue Settings area. Switching to "Deploy latest and cancel the others" will automatically cancel the previously queued release and queue the newer one. If you have Slack integration turned on (as I do) you will see a cancellation message.
So long as your process is simple enough that you know when new builds are being made, this feels like good behavior. It gives you a basic manual gate without adding any other overhead.
There is more documentation here: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/stages?view=azure-devops&tabs=classic#queuing-policies
Deployment Queue Setting: subsequent releases
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With