Microsoft Certified: DevOps Engineer ExpertDesign and implement pipelinesMedium
A DevOps team is managing a critical application deployed to Azure Kubernetes Service (AKS). They need to implement a strategy to ensure that new deployments are only rolled out after external systems confirm the health and performance of the deployed service. This validation process involves calling an external health check endpoint and verifying specific metrics in a monitoring system. If the checks fail, the deployment should be automatically rolled back. Which Azure DevOps feature should the team use?
- APost-deployment gates
- BConditional tasks in the pipeline
- CManual intervention tasks
- DPre-deployment approvals
Show answer & explanationAnswer & explanation
Correct answer: A. Post-deployment gates
Post-deployment gates are designed for this exact scenario. They allow the pipeline to pause after a deployment and execute automated checks, like calling external health check endpoints or querying monitoring systems. If the gates fail, the deployment can be configured to roll back or stop the pipeline, preventing unhealthy deployments from proceeding.
Why the other options are wrong
- B. Conditional tasks are for controlling whether a task runs, but they don't provide the built-in 'gate' functionality of pausing, re-evaluating, and failing the stage based on external system health, which gates offer.
- C. Manual intervention tasks pause the pipeline for human action *during* a stage, not for automated external checks *after* a deployment.
- D. Pre-deployment approvals are for human sign-off *before* deployment, not for automated checks *after* deployment.
Post-deployment Gates (Azure DevOps)
Automated checks that run after a stage's deployment to verify the health, performance, or other metrics of the deployed application before proceeding to the next stage or marking the stage as complete.
- Integrate with external monitoring, alerting, or ticketing systems.
- Can be configured to re-evaluate after a delay.
- Help ensure the quality and stability of deployments to production.
Memory trick: After deployment, the 'gate' checks if it's safe to proceed.