I need to limit the number of Artifacts a particular build is keeping. This one build generates very large artifact output which will eat through disk space. Ideally I would like to configure just that build to keep a maximum of the last 3 successful builds but I don't want this limit applied to all projects.
By default, the artifacts are stored under the <TeamCity Data Directory\>/system/artifacts directory which can be changed. You can configure an external artifacts storage to replace the built-in one. Build artifacts can also be uploaded to the server while the build is still running.
Artifact Paths Build artifacts are files produced by the build which are stored on TeamCity server and can be downloaded from the TeamCity UI or used as artifact dependencies by other builds.
Go to:
This is as close to what you want. The only devation being that it will only discard artifacts after the nth successful build.
Or, another option presented in the settings is cleanup based on a date, like "Only keep the past 7 days".
Update for TeamCity 9.x and above:
Administration
Edit
link for any of your branches or <root project>
*Clean-up rules
on left hand menuWhat to clean-up
choose the Edit
link.Artifacts
section, put a value in the box: Older than the []-th successful build
.*Please note that TeamCity uses inheritance so if you edit the <root project>
, all your projects will be affected. This is also the case if you set options for project groups.
Update for TeamCity 2019
Edit Build Configuration
in the top right.Administration / <Root project> / YourParentProject
YourParentProject
in the example above.)Clean-up Rules
from the menu on the left.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With