Azure Devops – Release Gates
In this blog post I want to talk to you about release gates within Azure Devops, release gates can be useful if you want to add in some further pipeline checks to stop the release going ahead.
Nothing better than an example so here is how to set up gated releases using Azure Devops.
This example shows how you can add in a release gate so that the release wont go ahead and deploy if say there are still open bug tasks within the Azure Board for the current sprint.
Once you have a release, first, click on the lightning bolt on the stage as seen below, and then enable the Gates are on the right hand side.
One this had been selected choose Add and then select Query Work Items, for this I have created a Shared Query where I created a shared query to show me if there are any bugs which are sitting as Approved (which I’m using as open but not started as yet), I don’t want the release to go ahead if there are any bugs in the Approved status.
Note:- In order to create a new query within Azure Devops on the left hand side select Boards, queries and then select new query.
An example query would look something like the following
Fill out the screen below like below and I set the upper threshold to 0.
To recap, I want my release to fail the gate so that the release wont go ahead because I have open bugs within my Azure Board for this particular project.
There are a number of different types of release gates you can use and here is a screen shot of the ones available to use at this time.
I hope you find this useful, if you have any questions please leave feedback.