Microsoft Certified: DevOps Engineer ExpertDesign and implement pipelinesMedium
A DevOps team is implementing a release pipeline for a critical microservice. The team wants to ensure that before any new version is deployed to production, a series of automated health checks and performance tests are successfully completed on a staging environment. Additionally, if the deployment fails, the previous stable version must be automatically restored. Which capability of Azure Pipelines should the team leverage to meet these requirements?
- AEnvironment-specific variables and service connections.
- BPre-deployment approvals and post-deployment conditions.
- CManual intervention tasks and scheduled triggers.
- DPre-deployment gates and automated rollback.
Show answer & explanationAnswer & explanation
Correct answer: D. Pre-deployment gates and automated rollback.
Pre-deployment gates in Azure Pipelines are designed to pause a release until specified automated conditions (like health checks or performance tests) are met. Automated rollback ensures that if a deployment fails, the pipeline can automatically revert to the last known good state, typically by redeploying the previous stable version.
Why the other options are wrong
- A. Variables and service connections are fundamental for pipeline configuration but don't directly implement automated health checks or rollback logic.
- B. Approvals are manual, not automated health checks. Post-deployment conditions are for triggering actions after deployment, not preventing it based on tests.
- C. Manual intervention tasks require human interaction, which contradicts the 'automated' requirement for health checks. Scheduled triggers are for timing, not for deployment safety or rollback.
Azure Pipelines Pre-deployment Gates & Rollback
Pre-deployment gates enforce automated checks before a stage can start, ensuring quality. Automated rollback provides a mechanism to revert to a previous stable state upon deployment failure.
- Pre-deployment gates automate checks (e.g., health, performance, security).
- Gates prevent deployments until all conditions are met.
- Automated rollback ensures recovery from failed deployments.
- Enhances reliability and reduces manual intervention in critical releases.
Memory trick: Gates Guard, Rollback Recovers.