There are currently two cleanup strategies for old builds, reserve by days, and reserve by count.
The problem with both strategies is that when we set to retain 3 last builds and there are 3 failing builds in a row, then the last successful build will be deleted.
For retention by number of days there is a similar problem, if last X days we had no green builds, then the last green one will be deleted once it's crossing the line.
Is there a way to preserve certain number of green builds? and discard all red ones?
Thanks