How to send TFS build to a specific agent or server


There are times when you need to troubleshoot a build definition and why it is failing only on one server, or you bring a new build agent/server into the pool and want to test and need to send to specific build/server.

To Send Builds to a Specific Agent:

In the build definition, under General, add the Demand Agent.Name and set equal to the name of the build agent under the value column. This will ensure the build is serviced by only this agent.

To Send Builds to a Specific Server:

Same concept as above except that instead of targeting a specific agent name, you will set the Computer Name as the demand to send all builds to the server.

In the build definition, under General, add the Demand Agent.ComputerName and set equal to the name of the server under the value column.

 

Comments (2)

  1. And how to avoid one specific?

  2. Eric Parvin says:

    I don't see an option to exclude a server. The only option I can think of setting multiple demands to each server you want the build to run on. I have not tested this option and would be curious to see how it works out.

Skip to main content