Agent Home Directory
The Build Agent Home Directory is the directory where the agent is installed.
TheBuild Agent can be installed into any directory. If you use the TeamCity.tar.gz distribution or .exe distribution opting to install a Build Agent, the agent will be placed into
>/buildAgent. The default directory suggested by the .exe agent installation is
The agent stores all related data under its directory and the only place that requires installation/uninstallation into an OS is integrating into the automatic start system (e.g. service settings under Windows).
The agent consists of:
agent binaries (stored under
libdirectories). The binaries can be automatically updated from the server to match the server version.
agent plugins and tools (stored under
toolsdirectories). These are parts of agent binary installation and are managed by the agent itself, updating automatically whenever necessary from the TeamCity server.
agent configuration (stored under
launcher\confdirectories). This is a unique piece of information defining the agent settings and behavior.
agent work directory (stored under the
workdirectory by default, configurable via agent configuration).
agent auxiliary data (stored under
updatedirectories). The data necessary during agent running.
agent logs (stored under
logsdirectory) - The directory storing internal agent logs that might be necessary for agent issues investigation.
Agent Files Modification
The agent configuration directory is the only one designed to have files that can be edited by the user. All the other directories should not be edited by the user.
The content of the agent work directory can be deleted (but only entirely). This will result in a clean checkout for all the affected builds.
The content of directories storing agent auxiliary data can be deleted (but only entirely and while the agent is not running). Deletion of data can result in extra actions during next builds on this agent, but this is meant to have only a performance impact and should not affect consistency.
Important Agent Files and Directories
agent.bat— batch script to start/stop the build agent from the console under Windows
agent.sh— shell script to start/stop the build agent under Linux/Unix
service.install.bat— batch file to install the build agent as a Windows service. See also related section.
service.start.bat— starts the build agent using the installed build agent service
service.stop.bat— stops the installed build agent service
service.uninstall.bat— batch file to uninstall the currently installed build agent Windows service
/conf/ — this folder contains all configuration files for the build agent
buildAgent.properties— main configuration file. This file is generated by the TeamCity server .exe installer and build agent .exe installer.
buildAgent.dist.properties— sample configuration file. You can rename it to '
buildAgent.properties' to create an initial agent configuration file.
teamcity-agent-log4j.xml— build agent logging settings. For details, please refer to comments inside the file or to the log4j manual
wrapper.conf.template— sample configuration file to be used as a template for creating the original configuration
wrapper.conf— current build agent Windows service configuration. This is a Java Service Wrapper configuration java properties file. For details, please see comments inside the file or Java Service Wrapper documentation.
launcher.log— log of the build agent launcher
teamcity-agent.log— main build agent log
wrapper.log— log of the Java Service Wrapper. Available only if the build agent is running as a windows service
teamcity-build.log— log from the build
upgrade.log— log from the build agent upgrade process
teamcity-vcs.log— agent-side checkout logs
.artifacts_cache— cache for all build's artifacts; can be configured
/temp — temporary folder; the path can be overridden in the Build Agent Configuration file
agentTmp— temporary folder that is used by the build agent to store build-related files during the build. Is cleaned after each build.
buildTmp— temporary folder that is set as the default temp directory for the build process and is cleaned after each build
globalTmp— temporary folder that is used by the build agent for its own temporary files. Is cleaned on the agent restart.