Deploying the Same Build Artifact to Dev, Test, and Production
You are designing a release pipeline that deploys to multiple environments (dev, test, prod) with approval gates between each. You need to ensure that the same build artifact is deployed to all environments. Which strategy should you use?
Quick Answer
Promoting the exact same build artifact through dev, test, and prod — rather than rebuilding at each stage — is what guarantees consistency: one immutable build output moves through the approval gates unchanged, eliminating any risk of environment-specific build drift between what was tested and what actually reaches production.
⚠ Common exam trap
Test-takers frequently confuse environment-specific configuration (which is handled by variable groups or pipeline variables) with the need for separate build artifacts, leading them to incorrectly select options that create multiple builds instead of promoting a single artifact.
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
✓
Use a single build pipeline and promote the same build artifact through each environment.
Promoting the same build artifact through each environment ensures consistency and traceability. In Azure Pipelines, a single build produces one immutable artifact; deploying that same artifact across dev, test, and prod eliminates the risk of environment-specific build variations. Approval gates between stages control the promotion, while the artifact remains unchanged.
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 multi-stage YAML pipeline with a separate artifact for each stage.
Why it's wrong here
Separate artefacts per stage means each environment deploys a different build, breaking the requirement that the same artefact reach all environments. It is tempting because per-stage artefacts allow environment-specific packaging, but promotion of one immutable artefact is what the scenario demands.
- ✗
Create a separate build pipeline for each environment to ensure environment-specific configurations.
Why it's wrong here
Separate build pipelines produce distinct artefacts per environment, so dev, test and prod never deploy identical bits, violating the stated requirement. It is tempting because separate builds allow environment-specific configuration, but a single build promoted through stages is required here.
- ✗
Use a single build pipeline but trigger a new build for each environment.
Why it's wrong here
Triggering a fresh build per environment yields different artefacts, so the same build is not deployed everywhere, contradicting the requirement. It is tempting because rebuilding can pick up environment-specific settings, but artefact immutability across stages is what the scenario demands.
- ✓
Use a single build pipeline and promote the same build artifact through each environment.
Why this is correct
Promoting one immutable build artifact through dev, test and prod guarantees identical binaries reach every environment, satisfying the same-artifact constraint. Rebuilding per environment would introduce drift, so a single build feeding staged deployments with approval gates is correct.
Go deeper
Related to this question
Learn chapter
Implementing Security and Compliance in Pipelines
Key term
Build artifact
A build artifact is the packaged, deployable output created by a build process, such as a compiled binary, ZIP file, or container image, that is stored for later use in testing or release.
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.
About these practice questions
Courseiva writes every AZ-400 question from scratch — 696 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
2 more ways this is tested on AZ-400
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. You are configuring a release pipeline that deploys to multiple environments (dev, test, prod). You want to ensure that the same build artifact is deployed to each environment without rebuilding. Which type of trigger should you use for the release pipeline?
easy- A.Pull request trigger
- B.Continuous integration (CI) trigger
- C.Scheduled trigger
- ✓ D.Build completion trigger
Why D: A build completion trigger ensures that the release pipeline is initiated only after a specific build pipeline completes, allowing the same build artifact to be deployed across multiple environments without rebuilding. This trigger is ideal for multi-environment release pipelines where consistency of the artifact is critical, as it decouples the build from the release and promotes the identical binary through dev, test, and prod.
Variation 2. You are designing a release pipeline in Azure Pipelines that deploys a web app to multiple environments (dev, test, prod). You want to ensure that the same build artifact is deployed to each environment without rebuilding. Which trigger type should you use?
easy- A.Pull request trigger
- ✓ B.Continuous deployment trigger on the release pipeline
- C.Schedule trigger
- D.Build completion trigger
Why B: A continuous deployment trigger on the release pipeline automatically starts a new release deployment whenever a new build artifact is available, ensuring the same build artifact is deployed to each environment without rebuilding. This is the correct choice because the requirement is to deploy the same artifact across multiple environments, and the continuous deployment trigger is designed to initiate a release pipeline after a build completes, preserving the artifact for downstream stages.
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.