Reputation: 153
I'm trying to add a health check to my azure devops pipeline. In order to do so I'm using a gate as a pre-condition to my deploy, which invokes a REST API which passes if OK is returned.
This is what the current setup looks like:
Take into account that "The time between re-evaluation of gates" must be at least 5 minutes and "The timeout after which gates fail" must be at least 6, it won't allow me to set it to 0.
So this setup kinda works, but it checks the REST API twice for some reason:
I would expect it to just carry on after the first check returns OK.
Upvotes: 1
Views: 672
Reputation: 35414
Refer to this doc: Release deployment control using gates
Most of the health parameters vary over time, regularly changing their status from healthy to unhealthy and back to healthy. To account for such variations, all the gates are periodically re-evaluated until all of them are successful at the same time. The release execution and deployment does not proceed if all gates do not succeed in the same interval and before the configured timeout.
The Release Gate requires multiple evaluations to pass. This is how the Release gate works.
I am afraid that it couldn't directly continue to run after first returning OK.
For a workaround, you can write PowerShell script to get the run API in a loop to get OK, and you can continue to run after the first OK.
You can refer to my PowerShell sample in previous ticket. .
Upvotes: 1