Courseiva

AZ-400 Practice Question: Design and implement build and release pipelines

You are creating a YAML pipeline in Azure Pipelines that must run three jobs: 'Build', 'Test', and 'Deploy'. The 'Test' job must run only after the 'Build' job completes successfully, and the 'Deploy' job must run only after the 'Test' job completes successfully. You need to configure the dependencies between jobs. What should you use?

⚠ Common exam trap

Candidates often confuse 'condition' with 'dependsOn'; 'condition' controls whether a job runs but does not create a dependency, so jobs would still run in parallel unless 'dependsOn' is also specified.

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

✓

dependsOn

To enforce sequential job execution where each job runs only after the previous one succeeds, you must use the 'dependsOn' keyword. This explicitly defines the dependency graph, ensuring that the Test job waits for Build and the Deploy job waits for Test, and that a failure in a dependency prevents dependent jobs from running.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    condition

    Why it's wrong here

    The 'condition' keyword determines whether a job runs based on a condition, but it does not establish a dependency. Without 'dependsOn', jobs run in parallel by default. Using only 'condition' would not enforce the required sequential execution order.

  • ✓

    dependsOn

    Why this is correct

    The 'dependsOn' keyword in Azure Pipelines YAML defines the order of job execution. By specifying 'dependsOn: Build' in the Test job and 'dependsOn: Test' in the Deploy job, you ensure that each job runs only after its dependency completes successfully. This is the correct way to model sequential job dependencies.

  • ✗

    continueOnError

    Why it's wrong here

    'continueOnError' allows a job to continue even if a task fails, but it does not control job execution order. It is used to prevent pipeline failure on specific task errors, not to define dependencies. This would not ensure that the Test job runs after the Build job.

  • ✗

    stages

    Why it's wrong here

    Stages are used to organize jobs into logical groups, but they do not enforce dependencies between individual jobs. While stages can have dependencies, the scenario specifically requires job-level dependencies. Using stages would add unnecessary complexity and not directly solve the requirement.

About these practice questions

This AZ-400 question is part of Courseiva's 696-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Microsoft exam blueprint

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.