1
votes

We have a gitflow branching strategy and I was wondering how that applies to the Azure Pipelines we have configured.

We have a ci.yml and cd.yml pipelines in the repositories. These pipelines cover all branches. (triggers, PR build validation, schedule, ...)

When I first setup these pipelines I have to manually create them on Azure DevOps.
There I have to select the default branch, I need to select the branch that has the new pipelines in order to use them.

enter image description hereenter image description here

My questions are:

  • Do I need to merge the pipelines all the way up to master and change the default branch for the pipeline to master? Which also means I need to go through the entire gitflow to fix the pipeline?
  • If the ci.yml pipeline triggers a build, from which branch is that pipeline taken?
1

1 Answers

2
votes
  1. no, you dont
  2. ci.yml has to be present in the branch in which you commit, you can just add it as file or cherry-pick the commit from another branch. it doesnt really matter

default branch is there only for initial setup of the pipeline, if ci.yml in your branch differs from whatever is default - it doesnt matter. your branch version is used.