Courseiva
Design and implement build and release pipelineshardMultiple ChoiceObjective-mapped

AZ-400 Practice Question: Design and implement build and release pipelines

You have a multi-stage YAML pipeline in Azure DevOps that deploys to multiple environments. The pipeline uses a deployment job with environment approvals. You need to ensure that the deployment to the production environment is only triggered after a manual approval is granted. However, you also want the deployment to automatically roll back if the post-deployment health check fails. Which configuration should you implement?

⚠ Common exam trap

Test-takers frequently confuse 'Auto-revert' with classic release pipeline features or assume manual intervention tasks are needed for rollback, overlooking the environment-level automatic rollback capability in YAML pipelines.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Enable 'Auto-revert' on the production environment and set post-deployment conditions.

Azure DevOps environments support an 'Auto-revert' setting that automatically triggers a rollback to the previous successful deployment when a post-deployment health check (defined via post-deployment conditions) fails. This combines manual approval (pre-deployment approvals on the environment) with automatic rollback, meeting both requirements without additional tasks or release pipelines.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use a release pipeline with a pre-deployment approval and a post-deployment automatic rollback trigger.

    Why it's wrong here

    The scenario specifies a multi-stage YAML pipeline, so a classic release pipeline is out of scope. Classic release pipelines do not provide the YAML environment-based 'Auto-revert' capability, and automatic rollback is not a native post-deployment trigger in that model.

  • Configure pre-deployment approvals on the production environment and use a post-deployment gate that fails the deployment.

    Why it's wrong here

    Pre-deployment approvals are valid for YAML environments, but a post-deployment gate that fails only marks the deployment as failed; it does not revert the already-applied changes. You need 'Auto-revert' enabled to trigger a redeployment of the previous release.

  • Configure pre-deployment approvals and add a manual intervention task to roll back if health check fails.

    Why it's wrong here

    Pre-deployment approvals only gate the start of a deployment and do not affect post-deployment outcomes; they cannot trigger a rollback. A manual intervention task pauses the pipeline for a human to decide the next step, but it does not automatically revert to a previous version if a health check fails, because the task itself is never executed autonomously. Since the requirement explicitly demands automatic rollback, relying on a human-in-the-loop control defeats that purpose and also does not leverage the environment's built-in auto-revert capability.

  • Enable 'Auto-revert' on the production environment and set post-deployment conditions.

    Why this is correct

    Auto-revert is a native environment setting that, when enabled, automatically redeploys the previously successful version (the last known good deployment) whenever post-deployment conditions, such as health-check gates, mark the current deployment as failed. This provides the automatic rollback behavior required without human intervention or a classic release pipeline, and it is fully integrated with YAML multi-stage pipelines. Setting post-deployment conditions ensures that the health check is evaluated before the revert trigger fires.

Visual reference

Client DHCP Server 1 Discover (broadcast) 2 Offer (IP: 192.168.1.10) 3 Request (I accept) 4 Acknowledge (lease confirmed) DORA — the four-step DHCP lease process

About these practice questions

This AZ-400 question is part of Courseiva's 823-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AZ-400 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-400 exam.