-
New Feature
-
Resolution: Fixed
-
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":
- causes
-
JENKINS-73864 Invalid parameter "removeLastBuild", did you mean "numToKeepStr"?
-
- Resolved
-
- is duplicated by
-
JENKINS-36364 Artifactory DSL set discardOldBuilds to true in multibranch pipeline Jenkinsfile
-
- Resolved
-
[JENKINS-68822] Don't keep Build Discarder/Logrotator's last stable/successful builds forever
Resolution | New: Fixed [ 1 ] | |
Status | Original: Open [ 1 ] | New: Fixed but Unreleased [ 10203 ] |
Released As | New: https://www.jenkins.io/changelog/2.474/ | |
Status | Original: Fixed but Unreleased [ 10203 ] | New: Closed [ 6 ] |
Link |
New:
This issue causes |
Comment | [ There seems to be a [regression|https://issues.jenkins.io/browse/JENKINS-73864], flag removeLastBuild is never set. ] |
Link |
New:
This issue is duplicated by |