TeamCity 3.0 Help

Build Checkout Directory

The build checkout directory is the directory where all of the project's sources reside. If the VCS checkout mode property of the build configuration is set to Automatically on server or Automatically on agent, TeamCity places the sources directly into the checkout directory.

If not specified, the following directory is used: <agent working directory>/<VCS settings hash code>. The VCS settings hash code is calculated based on VCS roots and VCS settings used by the build configuration. Effectively, this means that the directory is shared between all the build configurations with the same VCS settings.

If you need to know the directory used by a build configuration, you can refer to <agent working directory>/directory.map generated file which lists build configurations with the directory used by them.

If for some reason default directory does not match your requirements (for example, the process of creating builds depends on some particular directory), you may want to specify your own build checkout directory.

In the build script you may refer to the effective value of build checkout directory via the teamcity.build.checkoutDir property provided by TeamCity.

The checkout directory is automatically cleaned up if not used (no builds use it as checkout directory) for a specified period of time (by default it is two weeks). The time frame can be changed by specifying teamcity.agent.build.checkoutDir.expireHours System Properties of a Build Configuration.

If you upgrade to TeamCity 3.x from previous versions, please refer to Upgrade Notes describing several checkout directory-related issues.

Last modified: 20 April 2023