AZ-400 Practice Question: Design and implement build and release pipelines
You are designing a build validation policy for a GitHub repository. You want to ensure that all pull requests pass a CI check before they can be merged. What should you configure?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Add a GitHub Actions workflow that runs on 'pull_request' and set it as a required status check in branch protection.
Branch protection rules in GitHub can require status checks to pass before merging. You set up a rule that requires the CI workflow to succeed.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Enable Dependabot alerts on the repository.
Why it's wrong here
Enabling Dependabot alerts only scans open-source dependencies for known vulnerabilities and generates security alerts or upgrade PRs; it does not run a continuous integration build or produce a commit status that can be enforced as a required status check. This feature is unrelated to build validation, as it cannot prevent merging a pull request with failing code.
- ✗
Configure a repository rule to require a pull request before merging.
Why it's wrong here
Configuring a repository rule to require a pull request before merging ensures all changes go through a PR workflow, but it does not require any CI checks to pass. Without a mandatory status check, the branch can still be merged even if the build fails, so this alone does not enforce build validation.
- ✓
Add a GitHub Actions workflow that runs on 'pull_request' and set it as a required status check in branch protection.
Why this is correct
Adding a GitHub Actions workflow with a `pull_request` trigger executes CI on each PR, and then marking the resulting status check as required in branch protection blocks merging until that workflow completes successfully. This creates a hard enforcement gate that validates the build before changes can be merged, making it the correct approach for build validation.
- ✗
Create a webhook to trigger a build on Azure Pipelines.
Why it's wrong here
Creating a webhook to trigger a build on Azure Pipelines will start a pipeline when a PR is opened or updated, but the build result must be posted back to GitHub as a status check and then configured as a required status check to block merging. A bare webhook only initiates the build; it does not automatically enforce the build result as a merge gate.
Go deeper
Related to this question
Learn chapter
Designing a Build Pipeline
Key term
Branch
A branch is a pointer to a specific commit in a version control system that allows you to work on features or fixes in isolation from the main codebase.
Key term
GitHub
GitHub is a cloud-based platform for storing, tracking, and collaborating on code using Git version control.
About these practice questions
One of 823 original AZ-400 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-400 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-400 exam.