Microsoft Certified: DevOps Engineer ExpertConfigure processes and communicationsMedium

A software company uses Azure DevOps to manage its projects. They have multiple teams working on different components of a large system. To ensure consistent application of quality gates, security checks, and compliance requirements across all pull requests, they need a mechanism to define and enforce these standards centrally. Which Azure DevOps feature should they leverage for this purpose?

  1. AWork Item Templates
  2. BOrganization Policies
  3. CPipeline Templates
  4. DBranch Policies
Show answer & explanation

Correct answer: D. Branch Policies

Branch Policies in Azure DevOps are the primary mechanism for enforcing quality and compliance requirements on code merges. They can be configured to require specific checks (e.g., successful builds, code reviews, security scans) before a pull request can be completed, ensuring consistency across all teams for target branches like `main`.

Why the other options are wrong

  • A. Work Item Templates standardize the creation of work items but have no role in enforcing code quality or security checks during pull requests.
  • B. Organization Policies in Azure DevOps apply to the entire organization, often related to security, auditing, or usage, but not granularly to enforce specific pull request quality gates like reviewer count or build status.
  • C. Pipeline Templates standardize the CI/CD process itself but do not directly enforce merge conditions or quality gates for pull requests.

Azure DevOps Branch Policies

Azure DevOps Branch Policies are rules applied to Git branches to enforce code quality, consistency, and compliance. They mandate conditions like code reviews, successful builds, and external service checks before pull requests can be merged, ensuring only high-quality code enters critical branches.

  • Enforce quality and compliance.
  • Applied to specific branches (e.g., `main`).
  • Mandate PR conditions (reviewers, builds, scans).
  • Crucial for maintaining code health.

Memory trick: Policies guard the code's integrity.

More Configure processes and communications questions