Icon

You are viewing the documentation of TeamCity 10.x and 2017.x, which is not the most recently released version of TeamCity.
View this page in TeamCity 2018.x documentation or refer to the listing to choose the documentation corresponding to your TeamCity version.

 
Skip to end of metadata
Go to start of metadata

It is sometimes necessary to manage the Build Agents' workload more effectively.  For example, if the time-consuming performance tests are run, the Build Agents with low hardware resources may slow down. As a result, more builds will enter the build queue, and the feedback loop can become longer than desired. To avoid such situation, you can:

  1. Establish a run configuration policy for an agent, which defines the build configurations to run on this agent.
  2. Define special agent requirements, to restrict the pool of agents, on which a build configuration can run the builds. These requirements are:
    • Build Agent name. If the name of a build agent is made a requirement, the build configuration will run builds on this agent only.
    • Build Agent property. If a certain property, for example, a capability to run builds of a certain configuration, an operating system etc., is made a requirement, the build configuration will run builds on the agents that meet this requirement.
      Icon
      • You can modify these parameters when setting up the project or build configuration, or at any moment you need. The changes you make to the build configurations are applied on the fly.
      • You can specify a particular build agent to run a build on when Triggering a Custom Build.

Agent pools

You could split agents into pools. Each project could be associated to a number of pools. See Agent Pools.

Establishing a Run Configuration Policy

To establish a Build Agent's run configuration policy:

  1. Click the Agents and select the desired build agent.
  2. Click the Compatible Configurations tab.
  3. Select Run selected configurations only and tick the desired build configurations names to run on the build agent.

Making Build Agent Name and Property a Build Configuration Requirement

To make a build configuration run the builds on a build agent with the specified name and properties:

  1. Click Administration and select the desired build configuration.
  2. Click Agent Requirements (see Configuring Agent Requirements).
  3. Click the Add requirement for a property link, type the agent.name property, set its condition to equals and specify the build agent's name.

    Note

    Icon

    You can also use the condition contains, however, it may include more than one specific build agent (e.g. a build configuration with a requirement agent.name contains Agent10, will run on agents named Agent10, Agent10a, and Agent10b).

  4. Click the Add requirement for a property link and add the required property, condition, and value. For example, if you have several Linux-only builds, you can add the teamcity.agent.jvm.os.name property and set the starts with condition and the linux value.



See also: