Share via


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

  • Anonymous
    March 21, 2017
    And how to avoid one specific?
  • Anonymous
    March 22, 2017
    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.
  • Anonymous
    November 27, 2017
    Is this feature works in TFS15 SP3?
    • Anonymous
      December 08, 2017
      Yes, this should work on TFS 2105 to the newest version.