Courseiva
Design and implement build and release pipelineshardMultiple ChoiceObjective-mapped

AZ-400 Path filter Practice Question

Exhibit

Refer to the exhibit.
```yaml
trigger:
  branches:
    include:
    - main
    - release/*
  paths:
    include:
    - src/app/*
```

Your pipeline has the following YAML trigger configuration:

trigger: paths: include: - src/app/**

A developer pushes changes to a file in 'src/app/config.json' on a branch named 'release/v1'. Which statement is true about the build trigger?

⚠ Common exam trap

Candidates often think that path filters implicitly restrict branches, but without an explicit branch filter, the trigger applies to all branches.

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

The build will be triggered.

The provided YAML trigger includes a path filter that matches 'src/app/**'. The push to 'src/app/config.json' matches that include pattern, so the build triggers. No branch filter is specified, so the trigger applies to all branches including 'release/v1'. Therefore, option B is correct.

Answer analysis

Option-by-option breakdown

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

  • The build will be triggered but only if no other builds are running.

    Why it's wrong here

    Azure Pipelines YAML triggers do not consider concurrent build state; they simply evaluate branch and path filters. Since the trigger conditions are met, the pipeline is queued immediately regardless of any other builds that may be running.

  • The build will be triggered.

    Why this is correct

    The pipeline's trigger configuration matches the pushed branch via the 'release/*' wildcard and the modified files satisfy the include path filter, so the build is correctly triggered as soon as the change is pushed.

  • The build will not be triggered because the path filter is too restrictive.

    Why it's wrong here

    The path filter includes the directory containing the changed file, so it is not too restrictive. A build is triggered whenever any file under an included path is modified, and this change falls within that scope.

  • The build will not be triggered because the branch is not 'main'.

    Why it's wrong here

    The branch filter explicitly includes branches matching 'release/*', so the branch does not need to be 'main'. Since the pushed branch satisfies the wildcard pattern, the branch condition is satisfied and the build is triggered.

About these practice questions

This AZ-400 question is part of Courseiva's 823-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.