Artifacts clean-up for specific branches only

Hi,

I'm trying to clean-up my build artifacts, but I'd like to keep some builds longer than some other ones, based on the VCS branch used.

E.g, for a specific build, I would like to get:

  • artifacts kept for 7 days or at least 3 builds, for all build branches matching release/*
  • artifacts kept for 7 days or at least 1 build, for all other branches.

Right now, I can't get this result, since I have no way to specify my default Keep Rule to be for “all branches”, instead of being applied for each individual branch. 
This setting is only available on added policies, not on the base rule.

Am I doing something wrong, did I just miss the point ?

Any help would be welcome. Thanks !

Camille

0
1 comment
Hi,

This scenario looks achievable. It is not entirely clear from your description, but for me it looks like this:
Base rule: clean artifacts older than 7 days, and older than the 1st successful build.
Keep rule: keep artifacts for 3 last builds, for release/* branches, applied to each selected branch.

Please refer to the documentation on the order of rules application and description of settings: https://www.jetbrains.com/help/teamcity/2024.07/teamcity-data-clean-up.html.

Best regards,
Anton
0

Please sign in to leave a comment.