Bitzu

AZ-400 ยท Pipeline foundations

Job order and parallelism

dependsOn and conditions, matrix and parallel strategy, fan-out/fan-in, stage dependencies, passing outputs between jobs, artifacts across stages, parallel job limits.

Key points

  • Jobs in a stage run in parallel unless dependsOn is set.
  • Fan-out: several jobs depend on one. Fan-in: one lists several.
  • strategy.matrix: a leg per variable set; maxParallel caps legs; strategy.parallel: N copies.
  • Values: isOutput=true via dependencies.<job>.outputs; files: pipeline artifacts.
  • Organization parallel jobs cap concurrency.
  • GitHub Actions: needs, strategy.matrix, fail-fast, max-parallel.

Source: https://learn.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops

Practice questions

Single choice

Two jobs in the same Azure Pipelines stage have no dependsOn. How do they run?

  1. In parallel, subject to available capacity
  2. Sequentially, in the order written
  3. Alphabetically by job name
  4. Only after a manual approval
Show answer

Answer: A. In parallel, subject to available capacity

Jobs without dependencies run in parallel, provided enough parallel jobs and agents are available.

Select all that apply

Which approaches reliably pass data from one Azure Pipelines job to a later one?

  1. Publish a pipeline artifact and download it in the later job
  2. Set an output variable with isOutput=true and read dependencies outputs
  3. Set a plain variable without isOutput and expect it downstream
  4. Export an environment variable in the first job
  5. Leave files in the workspace and assume the same agent
Show answer

Answer: A. Publish a pipeline artifact and download it in the later job, B. Set an output variable with isOutput=true and read dependencies outputs

Output variables flagged isOutput=true are read through the dependencies context, and pipeline artifacts carry files. Ordinary variables, environment variables and leftover workspace files are not guaranteed across jobs.

True or false

A later job in the same pipeline can rely on files left in the workspace by an earlier job.

Show answer

Answer: False

False. Jobs may run on different agents, and Microsoft-hosted agents are fresh VMs for each job. Use pipeline artifacts to move files.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More AZ-400 topics in this module