Microsoft Certified: DevOps Engineer ExpertConfigure processes and communicationsEasy

A software company uses Azure DevOps to manage its projects. They have multiple teams working on different features, all contributing to the same main application codebase. To maintain a clean and stable `main` branch, they want to ensure that all changes are reviewed by at least two senior developers and pass all automated build validations before being merged. Which Azure DevOps feature should they configure to enforce these requirements?

  1. ARelease Pipelines
  2. BWork Item Tracking
  3. CBranch Policies
  4. DBuild Pipelines
Show answer & explanation

Correct answer: C. Branch Policies

Branch Policies in Azure DevOps are designed to protect important branches like `main`. They allow you to enforce conditions such as requiring multiple reviewers, linking work items, and passing build validations before a pull request can be completed and merged.

Why the other options are wrong

  • A. Release Pipelines automate the deployment of applications and are not used for enforcing code review or merge policies on source branches.
  • B. Work Item Tracking is for managing tasks, bugs, and features, not for enforcing code merge rules.
  • D. Build Pipelines automate the compilation and testing of code but do not enforce merge conditions on branches.

Azure DevOps Branch Policies

Rules configured on Git branches in Azure Repos to enforce quality and consistency before code can be merged.

  • Protect important branches like 'main' or 'develop'.
  • Can require minimum number of reviewers for pull requests.
  • Can require successful build validations before merging.

Memory trick: Branch Policies: 'B'ehind the main branch, 'P'rotecting with rules.

More Configure processes and communications questions