1
votes

Background:

We are running Visual Studio Team Services (VSTS) with Gitflow and have been trying to use a private pipeline with local build agents on our laptops. However, our local agents have been having trouble and for a particular pull request, the build is failing against this local agent. I have edited the build definition to use the Hosted2017 agent and want to requeue the Pull Request. I can manually queue a build off of the sha1 hash for the PR's commit to test out the agent. However, I would like to complete the pull request and I will the build to succeed and it doesn't seem like I can make the PR's build use the updated build definition.

Question:

So how do I get the Pull Request to get this build to work? I don't see an option to switch the build definition for the pull request? Do I just need to abandon and redo the PR or is there a way I can fix this PR without asking the developer that created it to jump through hoops so I can fix the build process?

Thanks!

1

1 Answers

4
votes

You can requeue the build for PR validation as below (for two situations):

Situation 1: Same build definition for PR validation, only change the Agent Queue for the build

After saving the changes (change Agent queue) for the build definition, you can just to queue the build manually:

Open the Pull Request -> click ... button (on the right of the build) -> click Queue build.

enter image description here

Then the build to verify the PR will be queued, and after the build is successful, you can merge the PR to continue the gitflow.

Situation 2: Use another build definition for PR validation

For this situation, you just need to change the branch policy to replace the PR build validation with the new build definition:

In branch policy -> Edit the build definition for PR validation -> select the new build definition for it -> save.

enter image description here

Then you can requeue the build as the way in situation 1.