Assign build configurations to specific agents
Last modified: 20 April 2023> 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 Basic Concepts for "agent.name" property for each of your two build configurations. To do that, go to the 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 one or several Linux-only builds. To ensure that these builds 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 MS Visual Studio installed for some .NET projects. On such agents, in buildAgent/bin/buildAgent.properties file you may set a system property system.VSS2005=true. Later, for build configurations which require Visial Studio, you can specify the requirement "exists VSS2005".
Thanks for your feedback!