Choose agent at build queue time

This is a simple feature that is not known very well and deserve a blog post. Sometimes you want to queue a build to a specific agent in a queue and this can be simply done using as a demand.

Demands are simple key/value pairs that allows the build engine to choose compatible agents and each agent automatically have a couple of capability to store computer name and agent name (they can be different)


Figure 1: Capability of agentes, computer name and agent name are automatically present

This allows you to use one of them if you want to run a build on a specific machine, just queue the build and use the demands tab to add or agent.computername demands.


Figure 2: Choosing specific agent at queue time with capability

If you specify a name that is not valid you will get a warning, if the queue contains that specific agent the build will be queued and will be executed only by that agent.

This technique is useful especially if you add a new agent and want to trigger some specific build on it to verify if it has all the prerequisite ok.

Gian Maria.

Published by

Ricci Gian Maria

.Net programmer, User group and community enthusiast, programmer - aspiring architect - and guitar player :). Visual Studio ALM MVP

2 thoughts on “Choose agent at build queue time”

  1. Thank you for this tip! This works perfect for us. Sometimes, we’d run into trouble with one TFS server, and we needed a way to test the build on certain TFS server.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.