Build Server - Artefacts clean up

Hi

We are running Team City 9.1.6 (build 37459) and finding that our clean up policies do not appear to be working correctly. This is causing the build server to run out of disk space on a regular basis.

Our projects have the following clean up rules in place

  • Everything older than the 5th successful build
  • Other items are kept forever
  • Do not prevent dependency artifacts cleanup

The above rules should work fine, however the \\servername\C$\ProgramData\JetBrains\TeamCity\system\artifacts\<project> folder has builds dating back to December last year. Does the clean up job only target artefacts on the agents rather than the server, do you need to write a seperate process to free up space on the server?

I've read on other posts that if the artefacts are used as depenedencies in other builds they wont be removed until the dependant builds are? Is it possible to track why certain builds haven't been removed?

Cheers

Charlie

 

 

1
4 comments

Hello,

The clean up is performed on server machine, not on agents. So no separate configurations needed for server.

Regarding artifacts: TeamCity always preserves builds which are used as snapshot dependencies in other builds, but artifacts of these builds can be deleted based on the clea-up rules. So if you have "Do not prevent clean-up", then artifacts should be cleaned up.

Could you please double check the cleanup rules of the build configuration in question for that artifacts are not cleaned? Also please check teamcity-cleanup.log file, do see there any errors/warnings?

 

0
Avatar
Permanently deleted user

Hi Alina

Thanks for the reply, i've taken a look at our build configurations and have confirmed the clean up rules are set correctly.

I have also reviewed the cleanup.log file and there are no errors, however the following is logged every morning

 INFO -  jetbrains.buildServer.CLEANUP - Builds to clean for cleanup level (Everything):     160 (275 excluded by dependency builds)

So in my previous example, If I look here:

\\servername\C$\ProgramData\JetBrains\TeamCity\system\artifacts\<project>

build arefacts are complete dating back to December. Each build contains around 80 - 100 mb of data. So even if there are dependency builds, the artefats are not being removed. Is there more documentation on dependency builds, i'm not clear on why certain build are considered dependencies?

 

 

0
Avatar
Permanently deleted user

Where is the teamcity-cleanup.log file located?

0

Hi Josh,

 

you can find all server-side log files under the installation directory, in the logs folder. More information about the contents of this folder here: https://www.jetbrains.com/help/teamcity/teamcity-home-directory.html

0

Please sign in to leave a comment.