Working with Azure devops, and piplines yaml files. There is a trigger on the develop branch. However, when I am saving changes to the yaml file, it triggers a new build.
This happens cause the change to the yaml file is a new commit, captured by the trigger.
So my question is, how can I exclude changes to the yaml file, from triggering a new build?
Stages filters for pipeline resource triggers requires Azure DevOps Server 2020 Update 1 or greater. You can trigger your pipeline when one or more stages of the triggering pipeline complete by using the stages filter. If you provide multiple stages, the triggered pipeline runs when all of the listed stages complete.
Scheduled release triggers allow you to run a release pipeline according to a schedule. Pull request release triggers are used to deploy a pull request directly using classic releases. Stage triggers in classic release are used to configure how each stage in a classic release is triggered.
Edit a YAML pipeline Sign in to your organization ( https://dev.azure.com/{yourorganization} ). Select your project, choose Pipelines > Pipelines, and then select the pipeline you want to edit. Choose Edit. Make edits to your pipeline using Intellisense keyboard shortcuts and the task assistant for guidance.
With changes announced here Support for wild cards in path filters we can now use wild cards:
Wild cards can be used when specifying inclusion and exclusion branches for CI or PR triggers in a pipeline YAML file. However, they cannot be used when specifying path filters. For instance, you cannot include all paths that match src/app//myapp*. This has been pointed out as an inconvenience by several customers. This update fills this gap. Now, you can use wild card characters (, *, or ?) when specifying path filters.
So you can now:
# specific path build
trigger:
branches:
include:
- master
- releases/*
paths:
include:
- '*'
exclude:
- '**/*.yml'
- '**/*.yaml'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With