AWS S3 Artifact Storage Plugin Cleanup
Our team had installed the AWS S3 artifact storage plugin and have our builds be uploaded to our AWS S3 bucket. Recently, we have noticed that all of the older builds are gone and only the recent builds remaining in the bucket. We have no lifecycle rules set up in AWS for any build artifacts that get uploaded, which means that the builds should stay permanently. We do have setup for clean-up rules in TeamCity for these builds where they will get cleaned up after X-th successful builds.
I was wondering if TeamCity cleanup rules plus the plugin cleanup logic has to do with this? So is this an expected behaviour? If that is so then how do we go about just cleaning the build history but not the artifacts that get uploaded to the S3 bucket?
Please sign in to leave a comment.
Hi,
When setting up the clean up rules for any specific project, you get to choose exactly what to clean. Build history, artifacts, or everything. You can select to never remove artifacts, but to clean history. Teamcity does not differentiate between artifacts in local storage or the s3 storage, and will clean based on those rules independently of where they are stored, so if you had artifacts set to be cleaned up, that's probably what happened.
If you have updated to 2019.2, there is a new UI to set the cleanup rules and a reworked system underneath, so the way to set them up is slightly different but the result should be the same.