AZ-400 Practice Question: Design and implement build and release pipelines
You are setting up a release pipeline that deploys to multiple environments (dev, test, prod) sequentially. Each environment requires approval before deployment. What is the best way to implement this in Azure Pipelines?
⚠ Common exam trap
A common mix-up: candidates think classic release pipelines are still the best practice, but Microsoft has not deprecated classic releases; they are legacy and Microsoft recommends YAML pipelines with environment resources for better traceability, consistency, and integration with modern DevOps practices.
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
✓
Define pipeline stages with environment resources and pre-deployment approvals.
Azure Pipelines supports multi-stage YAML pipelines where each stage can reference an environment resource. Pre-deployment approvals are configured on the environment itself, ensuring that before a stage deploys to that environment, the specified approvers must grant approval. This provides a native, auditable, and integrated approval gate without custom scripting or legacy tooling.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Define pipeline stages with environment resources and pre-deployment approvals.
Why this is correct
Defining stages with environment resources and pre-deployment approvals is the correct approach because each environment maps to a resource in Azure DevOps, and pre-deployment approvals provide a built-in, auditable manual sign-off before the deployment proceeds, making it the native and recommended YAML pipeline pattern.
- ✗
Use environment resources with 'auto' trigger and no approvals.
Why it's wrong here
Using environment resources with an 'auto' trigger and no approvals would allow the deployment to proceed automatically without any manual validation, meaning there is no human gate to catch issues before release, which defeats the purpose of having approvals for critical deployments.
- ✗
Use classic release pipelines with approval gates per environment.
Why it's wrong here
While classic release pipelines do support approval gates per environment, they are considered legacy because Azure DevOps is phasing out classic releases in favor of YAML pipelines; YAML offers better infrastructure-as-code, reusability, and integration with modern practices, so the classic approach is not the recommended forward-looking solution.
- ✗
Use a custom PowerShell script to pause and prompt for approval.
Why it's wrong here
Using a custom PowerShell script to pause and prompt for approval is not a best practice because it bypasses Azure DevOps' integrated approval mechanisms, provides no auditable approval records, and breaks in unattended or agent-based execution contexts; the native environment approval gates should be used instead.
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
Key term
Approval gate
An approval gate is a checkpoint in an Azure DevOps release pipeline where a pipeline run pauses until a designated team or person manually approves or rejects the deployment.
Key term
Release pipeline
A Release pipeline is an automated sequence of steps that takes software from code commit to production deployment, ensuring quality and consistency.
About these practice questions
One of 823 original AZ-400 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
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.