AZ400-Q: shorten a pipeline without breaking it

A pipeline runs linting, unit tests, and package creation. Package creation must use the compiled output only after unit tests pass; linting is independent. How should the team reduce duration safely?

  • A) Put all tasks in one step so the agent has less overhead.
  • B) Run linting and unit tests in parallel jobs, then make package creation depend on the successful unit-test job. ✓
  • C) Run package creation before tests to overlap the work.
  • D) Remove linting from CI and run it monthly.

Answer: B. Independent work can run in parallel, while an explicit dependency preserves the required order for package creation.

Why not the others: Steps in one job are sequential. Packaging first can publish unvalidated output. Removing a quality signal does not optimize the pipeline safely.

jobs-steps · pipeline-yaml · agent-pool