How to specify a build agent in vNext build

孤街浪徒 提交于 2019-12-04 05:09:34

问题


I have a vNext build definition, which has a agent pool specified. This agent pool has more then one agent. I want to specify say agent number 2 to be used by this build definition. How can I make sure that for a particular build definition a specific build Agent is used to run the build?


回答1:


You can add a User Capability to that specific build agent then in the build definition you put that capability as a demand (General tab)




回答2:


Now you can use Agent.Name or Agent.ComputerName demands in build def or when queuing a build: https://blogs.msdn.microsoft.com/ericparvin/2017/02/08/how-to-send-tfs-build-to-a-specific-agent-or-server/



来源:https://stackoverflow.com/questions/39341041/how-to-specify-a-build-agent-in-vnext-build

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