Mykhaylo Adamovych
Mykhaylo Adamovych

Reputation: 20966

TeamCity Automatic Checkout Directory (work directory) Cleaning

Each clean checkout TeamCity creates <Agent Work Directory>/<VCS settings hash code> directory for the build.
And it is feasible to Automatic Checkout Directory Cleaning where one could specify rules to clean up old build directories.

How could I tune agent to clean old build directory just after new one is created, ai not to maintain build history in work directory at all?

Thanks.

Upvotes: 1

Views: 4352

Answers (1)

Bilal
Bilal

Reputation: 922

Your answer is right in your question! ;)

The section Automatic Checkout Directory Cleaning notes:

The time frame for automatic directory expiration can be changed by specifying new value (in hours) by either of the following ways:

  • 'system.teamcity.agent.build.checkoutDir.expireHours' agent property in the buildAgent.properties file;
  • 'system.teamcity.build.checkoutDir.expireHours' Build Configuration property

Setting the property to "0" will cause deleting the checkout directories right after the build finish.

Upvotes: 2

Related Questions