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

Build Checkout Directory

Last modified: 28 February 2021

The build checkout directory is a directory on the TeamCity agent machine where all the sources of all builds are checked out into.

  • If you use the agent-side checkout mode, the build agent checks out the sources into this directory before the build.

  • In case you use the server-side checkout mode, the TeamCity server sends incremental patches to the agent to update only the files changed since the last build in the given checkout directory.

  • With the manual checkout mode, no sources will be checked out, but the default build checkout directory will still be created to check out the sources via a build script. The directory will not be cleaned automatically unless its expiration period is configured as described below.

The sources are placed into the checkout directory according to the mapping defined in the VCS Checkout Rules.

The checkout directory is configured in the Checkout Settings section on the Version Control Settings page; the default Auto (recommended) value is strongly advised, but it is possible to configure a custom checkout directory as described below.

If you want to investigate an issue and need to know the directory used by the build configuration, you can get the directory from the build log, or you can refer to the <Agent Work Directory>/directory.map generated file which lists build configurations with the directories they used last.

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

By default, this is also the directory where builds will run.

Administrator's Guide