0
votes

In Azure DevOps I created a branch policy for dev branch and selected a build definition.

in the build definition "Default branch for manual and scheduled builds" is set to Master and under trigger continuous integration is disabled.

When we do a pull request from feature to dev branch. It seems to take the right branch to build but how does the build definition know which branch to build?

2

2 Answers

0
votes

because the default branch is the branch that will get used when you manually build the build, not when its triggered.

0
votes

When you set the build policy in dev branch, the pr you initiated triggers the branch which you set the policy.

The branch you choose in "Default branch for manual and scheduled builds" is the branch that triggers when you build manually.