3
votes

In our Azure DevOps Build pipeline, I set "Enable continuous integration" to true, and set a filter to include only feature branches. enter image description here

This is working fine as expected - a build kicks off every time a user pushes changes from the local to remote feature branch.

The only issue I see is on branch creation - when a user creates a new branch from within their work item in the online DevOps in the Development pane, it triggers a new build as well. The branch is Based on "Development" branch, in pic above.

How can I avoid a build on branch creation, and only have a build when changes are checked in?

1

1 Answers

3
votes

How can I avoid a build on branch creation, and only have a build when changes are checked in?

I am afraid we could not achieve this at this moment. That because this is the current Azure Devops default design behavior, all files and paths in this branch are "new", which is also seen as a new change.

You can submit a user voice here:

https://developercommunity.visualstudio.com/content/idea/post.html?space=21

How to avoid a build on new branch creation

The workaround for this issue, you can create the Development branch with following construction Development/Test01:

enter image description here

Then set the Branch filters like Development/*:

enter image description here

Manually add in the textbox that allow you to "Filter my branches" and press Enter button:

enter image description here

Then if you create a new branch based on 'Development/Test01' branch, like 'Development/Test02':

enter image description here

The new created branch will not trigger a new build.

Hope this helps.