I have pipelines.yml file in main branch, whenever there is a change in main branch the pipeline executes without any issues but not for other branches.
It is also working, when I placed the same pipelines.yml copy in other branches as well.
How to avoid keeping same file each branch and trigger whenever there is a change in other branches too.
trigger:
batch: true
branches:
include:
- main
- dev
paths:
include:
- tfroot/env/*/numbers.txt
Edit: I am not sure, what is the mistake I am making in yaml pipeline. It is working as expected in classic pipeline, but not in yml.
classic pipeline trigger
I also tried exporting the classic pipeline as YAML and pasted in other pipeline,the result not changed.
2
Answers
you may try using template for the branch naming (Wildcards), linke:
- branch*
or override your yaml definition:
Each branch should contain the yaml file to run your pipeline. Check the documentation:
Branch consideration for triggers in YAML pipelines.
To avoid this, you may use: