Courseiva
Design and implement build and release pipelineseasyMultiple ChoiceObjective-mapped

AZ-400 Practice Question: Design and implement build and release pipelines

You are configuring a continuous integration trigger in Azure Pipelines for a repository in Azure Repos. You want to trigger a build for all branches except the 'release' branch. How should you configure the trigger?

⚠ Common exam trap

The trap is that candidates may think they need to explicitly include '*' to match all branches, but Azure Pipelines triggers on all branches by default unless an include list restricts it. A single exclude clause is sufficient.

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

Set trigger: branches: exclude: - release

In Azure Pipelines YAML triggers, the 'include' list is optional. If no include is specified, all branches are considered for triggering, and the 'exclude' list removes the specified branches. Therefore, 'trigger: branches: exclude: - release' correctly triggers on all branches except 'release'. The marked answer C also works, but D is the simpler and standard configuration.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Set trigger: branches: include: - main

    Why it's wrong here

    This configuration restricts CI triggers to only the main branch, so any commits to feature or release branches will not initiate a pipeline run, making it unsuitable for a multi-branch development workflow.

  • Set trigger: branches: include: - '*' exclude: - '*'

    Why it's wrong here

    Including all branches with '*' and then excluding all branches with '*' results in an empty branch filter set, meaning no branch will match and the continuous integration trigger will never fire.

  • Set trigger: branches: include: - '*' exclude: - release

    Why it's wrong here

    This configuration triggers CI on every branch except the release branch, allowing validation of all feature, develop, and other branches while preventing automatic builds for the release branch, which may have its own release-specific pipeline.

  • Set trigger: branches: exclude: - release

    Why this is correct

    Providing only an exclude list without an explicit include list means no branch is implicitly included, so the trigger will not be enabled for any branch; an include list must specify which branches are eligible for triggering.

Visual reference

Client DHCP Server 1 Discover (broadcast) 2 Offer (IP: 192.168.1.10) 3 Request (I accept) 4 Acknowledge (lease confirmed) DORA — the four-step DHCP lease process

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 →

How Courseiva writes practice questions · Editorial policy

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.