Forum Discussion
Release gates to check if particular stage is successed or failed
i'm trying to setup release gate which will verify if a STAGE is deployed or not , then the current stage should be deployed . i have check for release gates , and saw there function apps and API. but not sure , how to set it up.
1 Reply
How about this:
1. Create the Verification Endpoint
You can use an Azure Function or any REST API that:
• Accepts a request from Azure DevOps.
• Checks whether the previous stage was deployed (e.g., by checking a flag in a database, a file on disk, or a deployment log).
• Returns a JSON response like:{ "status": "succeeded" }
2. Configure the Gate in Azure DevOps
• Go to your release pipeline.
• Select the stage you want to protect.
• Under Pre-deployment conditions, click Add under Gates.
• Choose Invoke REST API or Azure Function.
• Provide the endpoint URL and authentication details.
• Set the success criteria, such as:eq(root['status'], 'succeeded')
3. Tune Gate Settings
• Set the evaluation interval (how often it checks).
• Set the timeout (how long it waits before failing).
• Optionally, add approvals or manual interventions.