How can I conditionally clean up artifacts?

TeamCity seems to let me define artifacts from multiple locations per project and allows me to specify a clean-up policy specific to artifacts. Is there a way to make it conditional per artifact specified? We like to keep a completed old run of the tests so that we can open bug reports and include the files used in running the tests but they are very, very large so we don't want to keep more than 1 or 2 around at a time. At the same time, we also want to archive of the summary of the test results but we want to keep those much longer so we can see how our software is trending over time. Does TeamCity support this ability?

1 comment
Comment actions Permalink


There is no ability to cleanup only some of build's artifacts, see TW-5072. This is likely to be implemneted in 7.0 release.
For the time being I can only suggest to store the large files in a separate build configuraiton or out of TeamCity...

I assume you have your tests reported in TeamCity (e.g. on builds Tests tab), so you get the test runs, their status and duration in TeamCity (and that is preserved when build artifacts are clened).


Please sign in to leave a comment.