-
New Feature
-
Resolution: Unresolved
-
Major
-
None
We current have the following Release workflow:
Every few days or weeks a new release-branch is created. This branch is then built and artifacts get archived. We usually keep the release-Branches over a year, so that we can compare any changes.
We also use the global build discarder with "days to keep artifacts"=90.
However we strangely still have builds with artifacts that are older than 90days. As these artifacts are rather big (>1GB) Jenkins is quickly running out of space.
After a bit of browsing through the Jenkins code I found a few lines of code that likely cause this issue: https://github.com/jenkinsci/jenkins/blob/ac66b476d94a6df70bd14a180454ebd804ab70f9/core/src/main/java/hudson/tasks/LogRotator.java#L233-L240
A few statements regarding these lines of code:
1. According to git these lines were introduced 13 years ago with https://issues.jenkins.io/browse/JENKINS-2417. Some kind of flag inside Logrotater (like ``boolean alsoDeleteLastStableBuild``) would be helpful, if this behavior is not wanted like described above.
2. The above lines are not documented inside the "Global Build Discarders":