Cleanup policy for failed builds

I'm trying to find a better cleanup policy for failed builds.     Currently, we are using "delete artifacts after 3rd successful build".

However, If i have a situation like this:

Build 79 - success
Build 78 - fail
Build 77 - fail
Build 76 - fail
Build 75 - fail
Build 74 - success
Build 73 - success


Builds 78-75 won't be purged with this cleanup policy.  As the artfiacts are 3 gb each, this is becoming a problem as we scale.   Is there another way to handle the cleanup policy of this situation?

Thanks!
Ruel Loehr

1 comment
Comment actions Permalink

Probably you can change your rule to clean after the 1st successful build and pin other builds which should stay in the history manually?

0

Please sign in to leave a comment.