Good to know Azure DevOps Build Triggers
Trigger in CI/CD Pipelines are important to create an effective CI/CD process. In Azure DevOps, you can configure pipelines for manual or automated triggers. The triggers will execute the pipeline whenever there is a commit or pull happens. You can schedule the trigger for a specific time as well. The details on Azure DevOps triggers can be found in the documentation itself but I am trying to cover the most important ones which can make your life easy.
Please note all YAML pipelines which you create in Azure DevOps are configured by default with a CI trigger on all branches. Azure DevOps allows you multiple ways to control them. I am listing a few of them below.
To control triggers, if a change is pushed to master or to any releases branch you can define it in the YAML file by using
You can define what branches should be included for triggers and options of
exclude gives more granular control. Apart from this, the
pathoption can let you ignore the change in a specific directory.
# trigger specified
- documents/README.md# Please note Paths are always specified relative to the root of the repository
Git Branches Tags:-
Another good option is using branch tags. This is very helpful in case you are putting tags with respect to releases.
There is an option of directly specifying tags to include or exclude:
# specific tag
In certain scenarios when automated triggers are enabled and devs don't want to build for commits then specific commit messages are available in Azure DevOps to avoid the build.