Q23 Container Registry Domain 1 · 20–25% of exam Priority · Real Exam

A multi-step ACR Task must build an image, run tests against it, and push only if tests pass. Which construct expresses this?

  1. A A quick task with az acr build
  2. B A YAML task file with build, cmd, and push steps plus a 'when' condition (correct answer)
  3. C Three separate scheduled tasks
  4. D A Dockerfile with multi-stage builds only

Shortcut: yaml support sequential build/cmd/push steps, dependencies via 'when', and shared volumes, enabling test gating inside the registry build itself.

Multi-step tasks defined in acr-task.yaml support sequential build/cmd/push steps, dependencies via 'when', and shared volumes, enabling test gating inside the registry build itself.