Reputation: 7851
I'm using Azure DevOps yaml pipelines. Whenever I push to a branch that has an open pull request, 2 builds are triggered: One with the name of the PR, the other with the name of the commit, see
The trigger section in both, source and target branch, is equal:
trigger:
branches:
include:
- "*"
# builds is already triggered once by branch
pr: none
How can I avoid triggering 2 builds for the same commit using the same (branched) pipeline.yaml in both branches?
Upvotes: 1
Views: 2225
Reputation: 1625
This is due to CI trigger on your branch and PR build validation policy running the pipeline automatically.
To avoid that either
After this change any of the changes will only trigger CI build/pipeline, and when ready just publish the PR or queue the PR manually
Upvotes: 2