BrainyBeeBrainyBee
ExploreBlogStart Studying
HomeDesigning and Implementing Microsoft DevOps Solutions (AZ-400)Job execution order, parallelism and multi-stage pipelines
Lesson254 words

Job execution order, parallelism and multi-stage pipelines

Design and implement a strategy for job execution order

The asymmetry that decides most questions

Jobs in a stage run in parallel by default. Stages run sequentially by default, in the order they are defined.

Two different defaults, two different keywords to change them:

yaml
stages: - stage: Build - stage: IntegrationTest dependsOn: Build - stage: FunctionalTest dependsOn: Build # runs after Build... - stage: SecurityScan dependsOn: [] # ...and THIS runs in parallel with everything

dependsOn: [] — an explicitly empty list — is how you opt a stage out of the implicit sequential chain. Omitting dependsOn entirely does the opposite: the stage waits for the previous one.

For jobs the reverse holds. Omitting dependsOn means "start immediately"; adding it imposes order.

Fan-out and fan-in

Loading Diagram...
Figure 1 — Mermaid diagram
yaml
- job: Publish dependsOn: [Lint, UnitTest, IntegrationTest] condition: succeeded()

A job listing several dependencies waits for all of them.

Matrix

yaml
strategy: matrix: linux: { imageName: ubuntu-latest } windows: { imageName: windows-latest } mac: { imageName: macOS-latest } maxParallel: 2

Two constraints worth memorising:

  • parallel and matrix are mutually exclusive — you cannot use both in one strategy block.
  • maxParallel is only valid with matrix.

Matrix multiplies one job definition into legs; maxParallel throttles how many legs run at once, which matters when your parallel-job allocation is finite.

Primary sources

  • https://learn.microsoft.com/en-us/azure/devops/pipelines/process/phases
  • https://learn.microsoft.com/en-us/azure/devops/pipelines/process/stages
All Designing and Implementing Microsoft DevOps Solutions (AZ-400) Study Resources

Related Notes

  • Agent and runner infrastructure421 words
  • Agent and runner infrastructure — quick notes150 words
  • Alerting on pipeline events255 words
  • Alerting on pipeline events — quick notes94 words
  • Analyzing usage and application performance241 words
  • Analyzing usage and application performance — quick notes73 words
  • Appropriate access levels217 words
  • Appropriate access levels — quick notes85 words
  • Automating container scanning277 words
  • Automating container scanning — quick notes96 words
  • Automating documentation from Git history191 words
  • Automating documentation from Git history — quick notes55 words

Ready to study Designing and Implementing Microsoft DevOps Solutions (AZ-400)?

Practice tests, flashcards, and all study notes — free, no sign-up.

Start Studying

Ready to study Designing and Implementing Microsoft DevOps Solutions (AZ-400)?

Practice tests, flashcards, and all study notes — free, no sign-up needed.

Start Studying — Free
Designing and Implementing Microsoft DevOps Solutions (AZ-400) ResourcesExplore All HivesBlogHome

© 2026 BrainyBee. Free AI-powered exam prep.

Loading Diagram...
Flowchart, left to right. Build connects to Lint. Build] --> L[Lint connects to UnitTest. Build] --> L[Lint connects to IntegrationTest. L connects to Publish. U connects to P. I connects to P.