How to run a build on a non-assigned agent?

I'm testing the setup of a new agent, and I want to run specific build configurations on it without affecting normal builds. How can I prevent regular triggers from putting builds on this machine, while still being able to force a build to run on it?

In other words, I have a "default" pool with all the regular agents in it. I've created a "test" pool with my new, untested agent, and I want to run a couple of builds there to ensure it produces good output before I let regular builds run on it.


Sometime I'm going to create a special test project that only builds on these machines, some day, but until then I need to run existing ones.


Hi! Creating a project copy is a valid solution. Another way to have an agent that would not be assigned a build automatically in the same pool as other agents would be as follows:

1. Add the following suffix to your untested agent name by editing the file:


2. Add the following agent requirement: matches %agentNameRegex%

3. On the Parameters pane, set the value of the %agentNameRegex% parameter to this negative look-around regular expression:


4. To run the build on an untested agent, use the run custom build dialog and override the value of %agentNameRegex% either exactly to the name of the untested agent, or to the following regex:


If the build is triggered with the default value of %agentNameRegex%, it will be assigned to an agent that doesn't have the world 'untested' in its name. So after you test the agent you will need to remove the '-untested' suffix from the agent name.

I hope this helps.



Please sign in to leave a comment.