Azure Pipelines YAML source

237 Views Asked by At

For our project, it is vital to know to understand the behavior of our yaml azure pipelines. So is there ever a situation where the azure pipeline, with ci triggers for branches, would use a different source yaml file other than the yaml file associated with the trigger branch? We believe that the azure pipeline will use the yaml file with the associated branch that the pipeline was triggered on. However we have not found any specific reference in the Microsoft documentation that would confirm this. Any concrete documentation would be appreciated.

1

There are 1 best solutions below

0
On
  • For CI triggers, the YAML file that is in the branch you are pushing is evaluated to see if a CI build should be run.
  • For PR triggers, the YAML file resulting from merging the source and target branches of the PR is evaluated to see if a PR build should be run.

Source: https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/azure-repos-git?view=azure-devops&tabs=yaml#a-wrong-version-of-the-yaml-file-is-being-used-in-the-pipeline-why-is-that