AZ-400 Practice Question: Design and implement build and release pipelines
Your team uses a multi-stage YAML pipeline in Azure Pipelines. The pipeline includes a stage that runs integration tests against a test environment. You want to ensure that the integration tests are not affected by other pipelines that deploy to the same environment concurrently. What should you implement?
⚠ Common exam trap
Many exam-takers confuse pipeline-level concurrency limits (Option B) with environment-level exclusive access, leading candidates to think limiting a single pipeline's parallelism is sufficient when multiple pipelines could still collide.
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
✓
Set the environment's 'Exclusive lock' check to enabled.
The 'Exclusive lock' check on an environment ensures that only one pipeline deployment can use that environment at a time. When enabled, Azure Pipelines will queue any other pipeline runs that target the same environment, preventing concurrent deployments that could interfere with integration tests. This directly addresses the requirement to avoid conflicts from parallel deployments.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Set the environment's 'Exclusive lock' check to enabled.
Why this is correct
Enabling the Exclusive lock check on an environment in Azure DevOps ensures that only one pipeline run can deploy to that environment at a time; any other runs that attempt to acquire the lock are queued until the current run releases it, providing the required concurrency control without limiting deployments across unrelated environments.
- ✗
Set the pipeline's 'Maximum number of parallel deployments' to 1.
Why it's wrong here
Setting the pipeline's 'Maximum number of parallel deployments' to 1 applies a global throttle that limits how many pipeline runs can execute deployment jobs at the same time, regardless of the target environment. This would serialize all deployments across every environment, unnecessarily blocking unrelated stages and increasing end-to-end deployment time. It also fails to provide per-environment concurrency control: if the limit is greater than 1, multiple runs can still reach and deploy to the same environment concurrently, while setting it to 1 creates a pipeline-wide bottleneck. The recommended approach is to enable the environment-specific 'Exclusive lock' check, which serializes only access to that environment and leaves other environments unaffected.
- ✗
Configure a required template check on the environment.
Why it's wrong here
A required template check is an Azure Policy-style evaluation that validates the pipeline's YAML template compliance before deployment, but it does not manage concurrency; it only ensures that the pipeline adheres to organizational governance rules, so it cannot prevent multiple runs from deploying to the same environment simultaneously.
- ✗
Add a manual approval check on the environment.
Why it's wrong here
A manual approval check pauses the pipeline before deployment until a designated user or group approves the request, but once approved, the deployment proceeds without any lock; if multiple runs are in progress, they can all reach and deploy to the same environment concurrently, so this check does not provide exclusive deployment locking.
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
Key term
Environment
An environment is a dedicated set of computing resources, configurations, and services used to develop, test, or host software applications in a controlled and repeatable way.
Key term
Stage
A stage is a discrete phase in a software development or deployment pipeline where code is built, tested, integrated, or released in a controlled environment.
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.