In TeamCity an agent tool (i.e. a set of files/a binary distribution) is a type of plugin without any classes loaded into the runtime; agent tools are used to only distribute binary files to agents.
TeamCity allows you to install / remove additional tools on all the agents, which is especially useful in the environments with a large number of build agents as you can distribute tools to or remove them from all build agents at once, centralize configuration files distribution (e.g. you want to distribute a custom configuration file/library to all agents), etc.
The Administration | Tools page provides a unified interface to set up tools to be used by appropriate plugins. You can install different versions of a tool and/or change the default one. The tools will be automatically distributed to all build agents to be used in the related runners.
The following types of tools can be managed up via the Administration | Tools page:
- IntelliJ Inspections and Duplicates Engine with the bundled version of IntelliJ IDEA set as default.
- JetBrains dotCover Command Line Tools with the bundled version set as default. Used to collect code coverage for your .Net project
- JetBrains ReSharper Command Line Tools: by default the tools are bundled with TeamCity and are used by Inspections (.NET), Duplicates Finder (.NET) build runners to run code analysis.
- Maven: several bundled versions are displayed, with 3.0.5 set as default.
- NuGet.exe used in NuGet specific build steps and NuGet Dependency Trigger. NuGet packages (.
nupkgfiles) with the tools/
NuGet.exefile inside are supported.
- NUnit 3: different versions can be installed and the default version set/changed
- Sysinternals handle.exe used to determine processes which hold files in the checkout directory on Windows agents.
- Sysinternals psexec.exe required for installing a TeamCity agent from a Windows server to a Windows host using Agent push
- You can also upload your own tool as a .zip archive: the structure of the tool plugin is described on the Plugins Packaging page. TeamCity will use the name of the zip file as the tool name on all agents. The zip file will be automatically unpacked on the agents to the directory with the same name.
When the first custom tool is installed, the Zip Archive section appears on the page. In this section, you can see all the tool usages, remove the tool, or install a new one.
You can see that the tool appears on the agent in the TeamCity Web UI by checking configuration parameters reported by the agent in the form
teamcity.tool.<the installed tool id>. You can use this parameter in your build: reference this parameter in the TeamCity Web UI (anywhere where the
%parameter% format is supported) or refer to this parameters in your build as an environment or a system parameter.
To distribute a tool to all agents, TeamCity places them into the
<TeamCity Data Directory>/plugins/.tools and monitors the content of this folder. Agents will restart in the process of obtaining the tool.