Configuring and applying trigger types in Azure DevOps is the foundation for automating software build and release workflows. These triggers connect event-driven activities, such as code updates or time intervals, to the execution of your pipelines. By controlling when and why a pipeline runs, development teams can protect their codebase, optimize computing resources, and establish clear delivery sequences.
A continuous integration trigger automatically starts a pipeline run every time a developer pushes code changes to the source repository. This immediate feedback loop ensures that new commits do not break the existing application by building and testing the code right away. To configure this behavior in YAML pipelines, you must include the trigger keyword at the root level of your file. From there, you specify which branches the system should monitor to start the build automatically.
Scheduled triggers run pipelines at specific times regardless of whether anyone has changed the codebase. This setup is ideal for routine, resource-heavy operations such as nightly security scans, regression testing, or periodic environment cleanup. You configure these schedules by adding the schedules keyword to your YAML file and defining the execution frequency using standard cron syntax. Through this method, the control plane manages the timing automatically, removing the need for manual team intervention.
A pull request trigger acts as a quality gate by running a pipeline to validate code changes before they merge into a target branch. This process prevents broken code from entering stable branches like main or release by running tests on the proposed merge commit. Developers configure these triggers using the pr keyword in the pipeline YAML definition. This configuration allows teams to require successful pipeline runs as a prerequisite for completing a merge request.
Pipeline resource triggers allow you to chain different pipelines together so that one runs automatically after another finishes. This dependency structure is highly useful in complex architectures where a release pipeline must wait for a build pipeline to complete successfully. To establish this workflow, you declare a resource dependency under the resources.pipelines block in your YAML configuration. Once the upstream pipeline reaches a completed state, the downstream pipeline detects this lifecycle event and begins its execution.
Branch and path filters provide granular control over triggers to prevent unnecessary pipeline runs and save computing costs. By applying these filters, you ensure that a pipeline runs only when changes occur in specific folders or on designated branches. You implement these rules by adding the branches and paths attributes directly under your trigger definitions. For example, you can configure a pipeline to execute only when files inside a specific folder on the main branch are modified.
A process flow showing how an event triggers a pipeline, followed by branch and path filter checks that either skip or execute the pipeline run.
Seeking the thrill of transformative tech? Explore the art of designing and implementing DevOps solutions on Azure. Master the shift towards CI/CD, testing, and delivery, while preparing for the Designing and Implementing Microsoft DevOps Solutions exam!
Prepare and test your skills

Prepare and test your skills

Continuous integration triggers run a pipeline automatically whenever code changes are pushed to a repository branch, whereas pull request triggers run a pipeline to validate code before it merges into a target branch. Continuous integration triggers are configured using the trigger keyword at the root level of the YAML file, while pull request triggers are configured using the pr keyword.
You can trigger a downstream pipeline after an upstream pipeline finishes by declaring a resource dependency under the resources.pipelines block in your YAML configuration. Once the upstream pipeline reaches a completed state, the downstream pipeline detects the lifecycle event and automatically begins its execution.
Scheduled triggers are configured by adding the schedules keyword to the YAML pipeline file and defining the execution frequency using standard cron syntax. This configuration enables pipelines to run automatically at designated times without requiring code changes or manual intervention.
Branch and path filters ensure a pipeline executes only when files are modified in specific folders or on designated branches, which prevents unnecessary runs and saves computing costs. These rules are configured by adding branches and paths attributes directly beneath trigger definitions in the YAML file.