TeamCity setting for deleting the contents of Work folders after a couple of weeks' inactivity

Completed

Hi there,

We're on a fairly old build of TC (2018.2.3) and it's got a feature where if a particular config isn't built for a couple of weeks or so, the agents delete the contents of the Work directory for that config. 

I can't find a way to turn that off, or control the time it waits before it does it. Is there an option somewhere that I'm missing?

Thanks,

Rob

6 comments
Comment actions Permalink

Hello Rob!

Per your description, project-level Clean-up rules are used: https://confluence.jetbrains.com/display/TCD18/Clean-Up#Clean-Up-ProjectClean-upRules
Could you please check if there is any non-default configuration for the build in question?

0
Comment actions Permalink

Hi Fedor,

Thanks for getting back to me!

Both the project level and configuration level clean-up rules are all set to Default.

Thanks,

Rob.

0
Comment actions Permalink

Hello Rob,

Could you please also check the below article and the settings it mentions? 
https://confluence.jetbrains.com/display/TCD18/Build+Checkout+Directory#BuildCheckoutDirectory-AutomaticCheckoutDirectoryCleaning

The default retention period on 18.1 version for cleaning up the checkout directory was equal to 8 days of inactivity. If other configurations you have use manual checkout or system.teamcity.build.checkoutDir.expireHours parameter specified, it is possible that just the configuration in question is a subject to automatic cleanup.

0
Comment actions Permalink

Hi Fedor,

That certainly sounds like the culprit! It does seem to affect all of our configurations.

I'm a little unclear on the solution though. I've added a project-level System property called system.teamcity.build.checkoutDir.expireHours set to "never" - is that correct?

Thanks,

Rob.

0
Comment actions Permalink

Rob,

Just to clarify; in case you have agent-side or server-side automatic checkout (https://confluence.jetbrains.com/display/TCD18/VCS+Checkout+Mode), automatic cleanup will occur for the configurations which were not built for 8 days (or if there is no free space available for newer builds). The above property (if you have set it on the project level, it will take effect for all configurations under the project) will ensure cleanup never happens automatically for the configurations in question. 

0
Comment actions Permalink

Perfect. Thankyou!

0

Please sign in to leave a comment.