4
votes

I'm using a build policy on one of my Azure DevOps git branches.

Is there any way of requiring a manually triggered branch build policy be run again if the source branch is updated?

My branch policy is set to Manual trigger. We use Manual instead of Automatic to reduce the number of builds (we use self hosted build server) running on our CI server as we typically open PR's early to provide feedback and facilitate conversation around code.

If the trigger was set to automatic, then any time source branch is updated a new build is queued. This isn't case with Manual. I had situation where build policy passed but then a further commit was made to branch and the reviewer approved. But the build was not manually triggered again and the last commit & push introduced a bug. I'd like the build validation policy to either reset or fail every time the source branch is updated similar to how code reviewer votes are reset after a push.

Is this possible?

2

2 Answers

1
votes

I do not think this is currently possible, it has been raised on the Developer community as a feature request / issue, so I would encourage you to up-vote this here.

1
votes

A solution for our scenario (too many builds were being queued, because Code Reviews come back with changes) was to use Pull Request drafts.

Sprint 143 - Draft Pull Request

When creating a PR, you can click Create as Draft in the drop down beside the Create button.