Microsoft DevOps Engineer Expert AZ-400 Practice Question
You are defining a multi-stage Azure Pipelines YAML file. The production stage contains two deployment jobs named Deploy-Database and Deploy-WebApp. The WebApp deployment must not begin until the database deployment completes successfully, but both jobs must remain in the same stage so they share the same environment approval. Which YAML approach will reliably enforce the required execution order?
Set timeoutInMinutes: 0 on Deploy-WebApp and use a script task to poll the database deployment status before continuing.
Define Deploy-Database as a deployment job and Deploy-WebApp as a regular job because deployment jobs automatically run first.
Merge the database and web app tasks into one job, counting on task order within that job to control sequencing.
Configure the Deploy-WebApp job with dependsOn: Deploy-Database and leave the default succeeded() condition in place.
In Azure Pipelines you control the execution order of jobs inside a stage by using job-level dependencies. By adding "dependsOn: Deploy-Database" to the Deploy-WebApp job (or, equivalently, listing the job name under the dependsOn collection) you create an explicit dependency graph. The job will start only after its dependency finishes and returns a successful result. Including the default "condition: succeeded()" (or explicitly setting the condition) further guarantees the second deployment runs only on a successful upstream result. Relying on task order, variable polling, or assuming deployment jobs run after regular jobs does not guarantee sequencing across separate jobs and therefore cannot ensure reliably ordered dependency deployments.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a deployment job in Azure Pipelines?
Open an interactive chat with Bash
How does the 'dependsOn' property work in Azure Pipelines?
Open an interactive chat with Bash
What is the purpose of the condition property in Azure Pipelines?
Open an interactive chat with Bash
Microsoft DevOps Engineer Expert AZ-400
Design and implement build and release pipelines
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99 $11.99
$11.99/mo
Billed monthly, Cancel any time.
$19.99 after promotion ends
3 Month Pass
$44.99 $26.99
$8.99/mo
One time purchase of $26.99, Does not auto-renew.
$44.99 after promotion ends
Save $18!
MOST POPULAR
Annual Pass
$119.99 $71.99
$5.99/mo
One time purchase of $71.99, Does not auto-renew.
$119.99 after promotion ends
Save $48!
BEST DEAL
Lifetime Pass
$189.99 $113.99
One time purchase, Good for life.
Save $76!
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .