VSTS Build expired

送分小仙女□ 提交于 2019-12-10 13:20:11

问题


I created a Pull Request which triggers the build and the build was successful, but after some time my build status changed to "build expired" so to finish the pull request I need to trigger it one more time. So the question is: Why has this happened and how do I avoid an expired build?


回答1:


"Build Expired" is a feature of branch policies. Set a build expiration to make sure that updates to your protected branch don't break changes in open pull requests.

Always require a new build

This option sets the build policy status in a pull request to "failed" when the protected branch is updated. You must re-queue a build to refresh the build status. This setting ensures that the changes in pull requests build successfully even as the protected branch changes. This option is best for teams that have important branches with a lower volume of changes. Teams working in busy development branches may find it disruptive to wait for a build to complete every time the protected branch is updated.


Require a new build if older than ... hours

This option expires the current policy status when the protected branch updates if the passing build is older than the threshold entered. This option is a compromise between always requiring a build when the protected branch updates and never requiring one. This choice is excellent for reducing the number of builds when your protected branch has frequent updates.


Don't require a new build

Updates to the protected branch do not change the policy status. This reduces the number of builds for your branch, but can cause problems when closing pull requests that haven't been updated recently.


More details on "Branch Policies"




回答2:


On the overview of the push request, next to "Build Expired" - click on the ellipses (3 dots to the right) and select "Queue Build". If it fails, pull master, merge it into your branch and re-push.



来源:https://stackoverflow.com/questions/46193136/vsts-build-expired

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!