Study guide
6.5 Pipeline Triggers, Filters & Concurrency Management
Microsoft Certified: Azure DevOps Engineer Expert AZ-400
Track your progress as you read
Finished sections get a check mark.
1 Chapter 1: Flow of Work, Traceability & Work Tracking
1.1 Flow of Work, GitHub Flow & Feedback Cycles 1.2 Work Tracking with Azure Boards & GitHub Projects 1.3 End-to-End DevOps Traceability & Quality Tracking
2 Chapter 2: DevOps Metrics, Dashboards & Team Collaboration
2.1 DORA Metrics, Flow Metrics & Dashboard Design 2.2 Lifecycle Metrics Across the Six DevOps Phases 2.3 Work Item Queries, WIQL Charts & Analytics 2.4 Project Documentation: Wikis, Mermaid Diagrams & Release Notes 2.5 Webhooks, Service Hooks & Microsoft Teams ChatOps
3 Chapter 3: Git Branching Strategies & Pull Request Workflows
3.1 Git Branching Models & Strategy Design 3.2 Pull Request Workflows & Merge Strategies 3.3 Branch Policies, Quality Gates & Compliance Restrictions
4 Chapter 4: Repository Management, Optimization & Git Data Operations
4.1 Git LFS Architecture & .gitattributes Tracking 4.2 LFS History Migration, git-fat & File Locking 4.3 Git Repository Scaling, Scalar & Monorepo Governance 4.4 Repository Permissions & Git Tag Governance 4.5 Git Data Recovery & Sensitive-Data Scrubbing
5 Chapter 5: Package Management & Dependency Versioning
5.1 Selecting Package Tools: Azure Artifacts vs. GitHub Packages 5.2 Feed Scoping, Upstream Sources & Pipeline Authentication 5.3 Package Views, Immutability & Quality Promotion 5.4 Dependency Versioning: SemVer, CalVer & Automated Versioning 5.5 Pipeline Artifact Versioning & Artifact Storage Strategy
6 Chapter 6: Pipeline Infrastructure, Agents & Integration
6.1 Selecting a CI/CD Solution: Azure Pipelines vs. GitHub Actions 6.2 GitHub-Azure Pipelines Integration & Hybrid Migration 6.3 Hosted vs. Self-Hosted Agents & Runners 6.4 VMSS Elastic Pools, Container Jobs & Agent Governance 6.5 Pipeline Triggers, Filters & Concurrency Management
7 Chapter 7: YAML Pipeline Architecture & Reusable Elements
7.1 YAML Pipeline Anatomy: Stages, Jobs, Steps & Workspaces 7.2 Job Execution Order: DAG Dependencies, Parallelism & Conditions 7.3 Reusable Elements: Templates, Parameters & Variables 7.4 Variable Groups, Secret Variables & Key Vault Linking 7.5 YAML Environments, Checks & Deployment Approvals
8 Chapter 8: Testing Strategy, Quality Gates & Code Coverage
8.1 Test Strategy Design: Local, Unit & Integration Testing 8.2 Load, Stress & Performance Testing in Pipelines 8.3 Test Execution Tasks, Agents & Results Integration 8.4 Code Coverage Analysis & SonarQube Integration 8.5 Quality Gates, Release Gates & Governance Checks
9 Chapter 9: Modern Deployment Strategies & Zero-Downtime Delivery
9.1 Progressive Delivery: Blue-Green, Canary & Ring Deployments 9.2 Minimizing Downtime: Deployment Slots & Rolling Updates 9.3 Feature Flags with Azure App Configuration & Feature Manager 9.4 Designing the High-Priority Hotfix Path 9.5 Ordered Dependency Deployments, Resiliency & Rollback
10 Chapter 10: Artifact Deployment & Database DevOps
10.1 Containerized Application Delivery: ACR, AKS & Container Apps 10.2 Binary, Web App, Function & Scripted Deployments 10.3 Database DevOps: State-Based & Migration-Based Strategies
11 Chapter 11: Infrastructure as Code (IaC) & Azure Deployment Environments
11.1 Infrastructure as Code Strategy: Bicep, ARM & Terraform 11.2 Desired State Configuration & Azure Machine Configuration 11.3 Azure Deployment Environments (ADE) & Developer Self-Service
12 Chapter 12: Pipeline Maintenance, Health & Modernization
12.1 Pipeline Health, Flaky Tests & Reliability Engineering 12.2 Pipeline Optimization: Caching, Slicing & Concurrency 12.3 Artifact & Build Retention Governance 12.4 Modernizing CI/CD: Classic to YAML Migration
13 Chapter 13: Authentication, Authorization & Identity Governance
13.1 Microsoft Entra Service Principals & Managed Identities 13.2 Service Connections, Workload Identity & Personal Access Tokens 13.3 Azure DevOps Projects, Teams & Permission Evaluation 13.4 Access Levels, GitHub Roles & Outside Collaborators
14 Chapter 14: Secrets Management, Sensitive Data & DevSecOps Scanning
14.1 Azure Key Vault, Secret Variables & Secretless CI/CD 14.2 Security Scanning Strategy, GHAS & Secret Scanning 14.3 CodeQL SAST in Pipelines and Containers 14.4 Software Supply Chain, Container Scanning & Cloud Defender
15 Chapter 15: Telemetry Collection, Azure Monitor & Alerting
15.1 Azure Monitor Architecture, AMA & Data Collection Rules 15.2 Application Insights & Specialized Azure Monitor Insights 15.3 Alerting Rules, Action Groups & GitHub Repository Insights
16 Chapter 16: Telemetry Analysis, Distributed Tracing & SRE Practices
16.1 Distributed Tracing, Application Map & Exception Triage 16.2 KQL Log Analytics, SRE Observability & Error Budgets
6.5 Pipeline Triggers, Filters & Concurrency Management
Key Takeaways Explain This Topic AI
Continuous Integration (CI) triggers automate pipeline execution upon code commits, leveraging branch and tag inclusion/exclusion filters to isolate release branches from development work.
Path filters prevent resource-draining, redundant builds in monorepos by restricting triggers to modified directories or explicitly excluding documentation and markdown files.
Pull Request (PR) triggers in YAML configure automated validation builds for external forks or GitHub repositories, but in Azure Repos, Branch Policies strictly supersede YAML PR triggers.
Scheduled triggers utilize 5-field cron syntax with flags like always: true to enforce nightly compliance scans regardless of code changes, and batch: true to consolidate rapid commit sequences.
Concurrency management prevents deployment collisions and resource exhaustion through parallel job licensing, matrix execution strategies, stage-level approvals, and autoCancel: true for obsolete pull request runs.
Last updated: September 2026
6.5 Pipeline Triggers, Filters & Concurrency Management
Enterprise CI/CD systems must intelligently manage when pipelines execute and how many jobs run concurrently. Uncontrolled pipeline triggers waste expensive compute resources, flood agent queues, generate noise for developers, and risk deployment collisions. Conversely, improperly configured filters can cause critical integration tests to be skipped.
On the AZ-400 exam, candidates are evaluated on their ability to configure Continuous Integration (CI) triggers, monorepo path filters, Pull Request (PR) validation mechanics, scheduled cron workflows, matrix parallelism, and concurrency throttling.
1. Continuous Integration (CI) Triggers & Branch Filters
A Continuous Integration (CI) trigger instructs the pipeline engine to execute automatically whenever code is pushed to the repository.
Basic Syntax and Default Behavior
In Azure Pipelines, the top-level trigger: keyword defines CI trigger behavior:
Default Behavior : If a YAML pipeline completely omits the trigger: section, Azure Pipelines applies an implicit default trigger equivalent to building all pushes on all branches ( trigger: branches: include: [ '*' ] ).
Disabling CI Triggers : To turn off automated push builds entirely (requiring manual or scheduled execution), explicitly set: trigger: none
Branch Inclusion and Exclusion Rules
Complex branching strategies (such as GitHub Flow or release branching) require targeted trigger rules: trigger:
branches:
include:
- main
- releases/*
- feature/*
exclude:
- feature/experimental/*
- feature/wip-*
- Evaluation Mechanics and Precedence
Order of Evaluation : Azure Pipelines evaluates inclusions first, followed by exclusions. If a branch matches both an include pattern and an exclude pattern, the exclude rule always wins .
Wildcard Syntax :
* : Matches zero or more characters within a single path segment (e.g., releases/* matches releases/v1 but NOT releases/2026/v1 ).
** : Matches zero or more characters across multiple path segments (e.g., feature/** matches feature/billing/stripe ).
Tag Triggers
Pipelines can also trigger when git tags are created and pushed to the remote repository. This is common for triggering semantic release pipelines: trigger:
tags:
include:
- 'v*'
- 'release-*'
exclude:
- '*-alpha'
- '*-beta'
- 2. Monorepo Path Filtering
In monorepos or multi-project repositories, multiple independent services, frontend applications, shared libraries, and documentation coexist in a single repository. Triggering an entire build and test suite when a developer merely edits a markdown README file severely wastes agent compute minutes.
Path Filter Syntax
Path filters restrict execution based on the file paths modified in a push: trigger:
branches:
include:
- main
paths:
include:
- src/BillingService/**
- shared/Contracts/**
exclude:
- src/BillingService/docs/**
- '**/*.md'
- Evaluation Rules for Paths
All Excluded : If every single file modified in a commit or push matches the paths: exclude: list, the pipeline does not run .
Mixed Changes : If a commit modifies three files matching paths: exclude: and at least one file matching paths: include: (or not excluded), the pipeline will trigger .
Relative Paths : Path patterns are always relative to the root directory of the repository and must use forward slashes ( / ), even on Windows-based agents.
3. Pull Request (PR) Triggers vs. Azure Repos Branch Policies
Pull Request triggers validate proposed code changes in an isolated branch before those changes are merged into the target branch. [Developer Opens Pull Request]
- │
- ┌────────────────────────┴────────────────────────┐
- ▼ ▼
- [GitHub Repository] [Azure Repos Git]
- │ │
Reads YAML `pr:` block YAML `pr:` block IGNORED!
- │ │
- Triggers Validation Pipeline Branch Policy Enforces Build
- (e.g., `pr: branches: [main]`) (Project Settings -> Repositories
- > Branch Policies -> Build Validation)
- PR Trigger Syntax in YAML
For repositories hosted in GitHub , GitHub Enterprise , or Bitbucket Cloud , PR triggers are defined directly in the pipeline YAML file: pr:
branches:
include:
- main
- releases/*
paths:
include:
- src/**
exclude:
- docs/**
- The Critical Azure Repos Exception (Top AZ-400 Exam Concept!)
Important
AZ-400 Exam Rule : In Azure Repos Git , Pull Request triggers defined in the YAML file ( pr: ) are completely ignored .
Why does Azure Repos ignore YAML pr: blocks?
Security and Governance Architecture : In Azure Repos, build validation is treated as an administrative governance policy, not an author-controlled configuration. If YAML pr: triggers were respected, a developer creating a feature branch could delete the pr: section from their YAML file, bypass automated testing, and merge defective code.
Enforcement via Branch Policies : In Azure Repos, PR validation builds must be configured under: Project Settings → Repositories → Select Repository → Policies → Select Branch (e.g., main ) → Build Validation .
Here, administrators select the build pipeline, configure whether the build is Required or Optional , set a trigger filter, and define policy expiration rules (e.g., "Immediately when main is updated").
Security for Forked Repositories
When building pull requests originating from forked repositories (common in open-source projects):
Pipeline Secrets : Secrets and secure files are not made available to PR builds from forks by default to prevent malicious pull requests from leaking credentials via echo $SECRET .
Approval Gates : Administrators can configure pipelines to require team member approval before executing pipelines on PRs submitted by non-contributor forks.
4. Scheduled Triggers & Batching
Scheduled triggers execute pipelines at recurring temporal intervals, independent of code pushes.
POSIX Cron Syntax in Azure Pipelines
Scheduled triggers use standard 5-field POSIX cron syntax under the schedules: block: Minute Hour Day of Month Month Day of Week ( 0 − 59 ) ( 0 − 23 ) ( 1 − 31 ) ( 1 − 12 ) ( 0 − 6 , 0 = Sunday ) \begin{array}{ccccc}
- \text{Minute} & \text{Hour} & \text{Day of Month} & \text{Month} & \text{Day of Week} \\
- (0-59) & (0-23) & (1-31) & (1-12) & (0-6, 0=\text{Sunday})
\end{array} Minute ( 0 − 59 ) Hour ( 0 − 23 ) Day of Month ( 1 − 31 ) Month ( 1 − 12 ) Day of Week ( 0 − 6 , 0 = Sunday ) schedules:
- cron: '0 2 * * 1-5' # Runs at 02:00 AM UTC, Monday through Friday
- displayName: 'Nightly Weekday Regression & Security Scan'
branches:
include:
- main
- releases/v2.0
- always: true # CRITICAL FLAG
- The always Keyword
always: false (Default): The scheduled pipeline will only run if there have been new commits pushed to the specified branch since the previous scheduled execution. If no code has changed, the run is skipped.
always: true : The pipeline executes unconditionally on schedule, even if no code changes occurred . This is mandatory for:
Nightly Static Application Security Testing (SAST) and software composition analysis (detecting newly published zero-day CVEs against static dependencies).
Long-running end-to-end synthetic performance and load tests.
External environment health and drift verification.
Batching CI Builds ( batch: true )
When multiple developers push commits rapidly to a shared branch, queuing individual builds for every single commit causes queue explosions and long developer wait times. trigger:
batch: true # Batches in-flight commits
branches:
include:
- main
Mechanics of batch: true : If a pipeline run is already executing for branch main when new commits are pushed, Azure Pipelines does not start a new build immediately . Instead, it waits until the current run finishes, aggregates all commits pushed during that execution window, and executes a single combined build containing the aggregated changes.
5. Concurrency, Matrix Execution & Parallelism Licensing
Managing pipeline concurrency ensures efficient throughput without overloading cloud APIs, target databases, or build infrastructure.
Azure DevOps Parallel Job Licensing Models
Pipelines cannot run concurrently without allocated Parallel Jobs :
- Capability Microsoft-Hosted Parallel Jobs Self-Hosted Parallel Jobs
- Free Tier (Private Projects) 1 job, 1,800 minutes/month cap 1 job, unlimited minutes
- Free Tier (Public Projects) 10 parallel jobs, unlimited minutes Unlimited jobs, unlimited minutes
Paid Addition Monthly tier; grants 1 concurrent job with unlimited minutes Monthly tier; grants 1 concurrent job on self-hosted agents
Queue Behavior Jobs queue until an agent in the pool becomes available Jobs queue until a self-hosted agent listener picks it up
Matrix Execution Strategies ( strategy: matrix )
A matrix strategy runs the same job across multiple permutations of operating systems, runtime versions, or deployment targets concurrently: jobs:
- job: CrossPlatformBuild
strategy:
matrix:
Linux_Net8:
- imageName: 'ubuntu-latest'
- dotnetVersion: '8.0.x'
Linux_Net9:
- imageName: 'ubuntu-latest'
- dotnetVersion: '9.0.x'
Windows_Net8:
- imageName: 'windows-latest'
- dotnetVersion: '8.0.x'
- maxParallel: 2 # Throttles concurrency
pool:
vmImage: \$(imageName)
steps:
- task: UseDotNet@2
inputs:
- version: \$(dotnetVersion)
- script: dotnet test
maxParallel : Restricts the maximum number of matrix legs that execute simultaneously. In the example above, even though 3 matrix configurations exist, only 2 execute at any given time, preserving agent pool capacity for other pipelines and avoiding database connection saturation.
Pull Request Auto-Cancellation ( autoCancel: true )
In rapid pull request workflows, developers often push follow-up commits while an earlier PR build validation is still running. pr:
autoCancel: true # Cancels obsolete PR builds
branches:
include:
- main
When autoCancel: true is configured (supported in GitHub and Bitbucket repositories), pushing a new commit to an active PR branch immediately aborts the in-progress build and starts a new run for the latest commit. This immediately frees up build agent capacity.