TeamCity
 
You are viewing the documentation for an earlier version of TeamCity.

Build Agent

Last modified: 20 April 2023

A TeamCity Build Agent is a piece of software that actually executes a build process. It is Setting up and Running Additional Build Agents separately from the TeamCity server. An agent can be installed on the same computer as the server or on a different machine (the latter is a preferred setup for server performance reasons).

An Agent typically checks out the source code, downloads artifacts of other builds and runs the build process. Number of agents basically limits the number of parallel builds and environments in which your build processes are run.

TeamCity server monitors all the connected agents and assigns queued builds to the agents based on Agent Requirements.

If there are several idle agents that can run a build TeamCity tries to select the fastest one based on the builds history.

In TeamCity, a build agent can have following statuses:

All agents connected to the server must have unique agent name.

Only users with certain roles can manage agents. See role and permission for more information.

For a build agent configuration please refer to Build Agent Configuration section.

Agent Upgrade



TeamCity agent is upgraded automatically when necessary. The process involves downloading new agent files from the TeamCity server and restarting the agent on new files. In order to successfully accomplish this, the user under which agent runs should have Setting up and Running Additional Build Agents permissions.

Typically, an agent upgrade happens on:

  • server upgrade

  • agent plugin added or updated on the server

  • new tool installed (e.g. handle.exe for Swabra or new version of NuGet)