AZ-400 - Design and Implement Build and Release Pipelines (53% of the exam) - Section 3.4

Design and implement quality and release gates and code coverage analysis, including security and governance gates.

Define quality gates and release gates that enforce code coverage thresholds, security scans, and governance checks before a pipeline stage proceeds. Weigh the use of approvals and gates in YAML environments against classic release pipeline gates to choose the right enforcement mechanism for each scenario.

quality gatesrelease gatescode coverageapprovals and gatesgovernance checks

Practice question for this objective

Free sampleDesign and Implement Build and Release Pipelinesmedium

A team is migrating a classic release pipeline in "Azure DevOps" to a multi-stage YAML pipeline. In the classic release, each deployment stage targets a named deployment environment and gathers a pre-deployment approval before the deployment proceeds. They want the YAML pipeline to preserve those per-stage approvals when it deploys. Which YAML construct carries the approval behaviour that the classic stage approval provided?

  • AA "variable group" linked to the deployment stage, which stores the approver list and gates the stage until an approver releases it.
  • BA pipeline "trigger" condition on the stage that waits for an approver to push a tag before the deployment stage runs.
  • CA deployment job that targets an "environment", with an approval check configured on that environment so the deployment waits for sign-off. Correct
  • DA "task group" referenced by the stage that bundles the deployment steps together with the approver list as one reusable unit.
Reproduce a classic release stage approval in YAML by targeting an environment with an approval check from a deployment job. Classic per-stage approvals do not export directly as YAML steps. The equivalent in YAML is an environment-level approval check that fires when a deployment job targets that environment, pausing the run for sign-off before deployment. Variable groups, triggers, and task groups manage configuration, start conditions, and reusable classic steps respectively, none of which gate a deployment on approval.

Why A is wrong: A variable group shares configuration values and holds no approval logic, so it cannot gate a deployment on a sign-off even though it is linked to a stage.

Why B is wrong: Triggers decide when a pipeline or stage starts based on events, not on human sign-off, so this is a tempting but incorrect place to put an approval.

Why C is correct: In YAML, the classic stage approval is reproduced by an approval check on an environment that a deployment job targets, so the run pauses for sign-off before deploying just as the classic stage approval did.

Why D is wrong: Task groups bundle reusable steps in classic pipelines and have no role in YAML approvals, so naming them here confuses a classic authoring aid with an approval gate.

See more AZ-400 practice questions, answers explained.

Exam traps in Design and Implement Build and Release Pipelines

Answers that look right on this material and are not. Each one is a distractor from a different question in the AZ-400 bank for this domain.

  • The "Publish Build Artifacts" task pointed at the Cobertura file, so the report is uploaded with the run and reviewers download it to read the coverage percentage locally.

    Why it is wrong: Publishing build artifacts only stores the file for download and never feeds the Code Coverage tab, so the percentage and browsable report do not appear on the run summary.

  • Enable "Dependabot" alerts so the workflow scans the dependency manifests for components with known advisories and reports vulnerable open-source packages into the security tab.

    Why it is wrong: Dependabot scans declared dependencies for known advisories, which is tempting, but it does not perform static analysis of the application's own source code for vulnerabilities like injection flaws.

  • A manual pre-deployment approval assigned to the security team so a reviewer confirms compliance before each production release.

    Why it is wrong: A manual approval is plausible for governance, but it relies on a human clicking and reading dashboards rather than the automatic gate evaluation the scenario demands, so it fails the no-human-click condition.

Examworthy is not affiliated with or endorsed by Microsoft. Original, blueprint-aligned practice material only.