Microsoft DevOps Engineer Expert AZ-400 Practice Question
You are designing an Azure Pipelines YAML definition with two stages, Build and Test. The Test stage uses a matrix strategy to run jobs across multiple platforms. You need to ensure the Test stage only begins after the Build stage completes successfully, and that the entire pipeline fails if any job in the Test stage's matrix fails. Which YAML structure correctly implements these requirements?
Define the Test stage with a dependsOn: Build property and no custom condition.
Define the Test stage with dependsOn: Build and condition: always().
Add continueOnError: true to the job within the Test stage's matrix.
Define the Test stage with condition: succeeded('Build') but without a dependsOn property.
The dependsOn property at the stage level is used to enforce execution order, making the Test stage wait for the Build stage. By default, a stage with this dependency will only run if the preceding stage succeeds (an implicit condition: succeeded()). If any job within the Test stage's matrix fails, the Test stage itself fails. Because there are no subsequent stages with conditions that would override this outcome, the entire pipeline run will correctly be marked as failed.
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 the purpose of the 'dependsOn' property in Azure Pipelines?
Open an interactive chat with Bash
How does the matrix strategy work in the 'Test' stage?
Open an interactive chat with Bash
What happens if any job fails in a matrix stage?
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 .