The requirement is to have AZDO run some bash commands during a PR. The source and target branch of the PR are used in the bash commands. This is to be executed during PRs for almost all repos in the project.
What I'm doing currently
- Create a template for the pipeline (the template is in a standalone utility repo)
- In each of my repo, create a yaml file that uses the template
- Create a pipeline for each repo which uses the yaml that was created
- Add the pipeline to the respective branches' PR policy
This works as expected, but I have to create and maintain multiple pipelines which are essentially doing the same thing.
What I've tried
- Create a template for the pipeline (the template is in a standalone utility repo)
- In the same repo as the template, create a yaml file that uses the template
- Create a pipeline which uses the yaml that was created, pointing to the utility repo
- Add the pipeline to the respective branches' PR policy
The issue with my attempt was that the PR build with this pipeline wouldn't run because it does not stem from the same repository of the PR branches.
My question
Is there a way to accomplish this without creating a pipeline for each of my repo just so that it would be able to run in a PR build?