How do I point a project build config to a specific build agent?

Hi,

I have two projects and two agents, each running on a build machine non-interchangable with the other. Each project needs to run on a specific machine, but since I'm wrapping the build in a "Command Line" runner, I can't use the build runner to tell TC to send to the correct agent.

Do I need to define my own build runners, one for each machine? If that is the answer, where do I start?

Thanks!
-chris

2 comments

Hi Chris,

I have two projects and two agents, each running on a
build machine non-interchangable with the other.
Each project needs to run on a specific machine, but
since I'm wrapping the build in a "Command Line"
runner, I can't use the build runner to tell TC to
send to the correct agent.


The most simple variant in your case is to add a build configuration requirement for
"agent.name" property for each of your two build configurations. To do that, go to build
configuration administration page, section "Agent requirements".
Use "Add requirement for a property" link to add requirement for property agent.name with
condition "contains" and value of the appropriate agent name.

Using the requirements technique, you can distribute build configurations among agents depending on agent capabilities and needs of the build configurations.

For instance, you can have several linux-only builds. To ensure that these build run only on Linux agents, you may add a build configuration requirement for os.name property with condition "starts with Linux".

Another example - you may have some agents with VisualStudio installed to build some .NET projects. On such agents, in buildAgent/bin/buildAgent.properties file you may set a property
system.VSS2005=true . Later, for build configurations which require Visial Studio, you can specify a requirement "exists VSS2005".

Hope this helps,
KIR

0

Beautiful, Thanks Kirill!
-chris

0

Please sign in to leave a comment.