Artifacts are not cleaned up (Team City 9.1.6 Enterprise)
We are using TeamCity Enterprise 9.1.6 (build 37459). I have a minimal build configuration that has a single Power Shell build step that creates a new file:
New-Item new_file.txt -type file
I have also configured the below artifact paths:
new_file.txt => test.zip
Under the Clean-up rules I have set the following rule for artifacts for a build configuration:
Artifacts older than the 1st successful build; artifact patterns: +:**/*
Meaning that only one artifact should be kept. I have now run the build several times but it keeps artifacts for all builds:
Why are the artifacts not cleaned up? I took a look at the data directory:
And they are all there. What am I missing?
Notice:
- The builds are NOT pinned
- The build is NOT used as a source for artifact dependency in other builds
- The build is NOT used as a snapshot dependency in other builds
- No builds were manually deleted within the last day.
I also looked at:
and:
But did not find an answer.
/Johannes
Please sign in to leave a comment.
Hi Johannes,
By default clean-up process runs once a day. You can check it on Administartion > Clean-up Settings page.
Did the clean-up run after the last builds and after you set up rules? If not, please run it manually and check if the builds are deleted.
Thanks for the quick response.
Yes I did try to run that manually but for one of our project it has no effect. I have created that project from scratch again and triggering the clean up manually now seems to work for that project too.
It could be great if the clean-up would be triggered when the limit was reached for each build config though - we will have lots of pushes going in during a single workday with potentially lots of artifacts.
Currently it's only possible configure (via UI) clean-up to trigger once a day. Please vote for the request: https://youtrack.jetbrains.com/issue/TW-5050.
As workaround you can trigger clean-up via emulating the clean-up start action sent from browser, see the comment with example request.