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
Two jobs in the same Azure Pipelines stage have no dependsOn. How do they run?
- In parallel, subject to available capacity
- Sequentially, in the order written
- Alphabetically by job name
- 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.
Which approaches reliably pass data from one Azure Pipelines job to a later one?
- Publish a pipeline artifact and download it in the later job
- Set an output variable with isOutput=true and read dependencies outputs
- Set a plain variable without isOutput and expect it downstream
- Export an environment variable in the first job
- 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.
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.
