-
Bug
-
Resolution: Incomplete
-
Major
-
None
LogRotator.setRemoveLastBuild(boolean) method is annotated with DataBoundSetter, but it can't be set from a pipeline (neither declarative, nor scripted):
options { buildDiscarder(logRotator(numToKeepStr: '2', daysToKeepStr: '7', removeLastBuild: true)) }
WorkflowScript: 30: Invalid parameter "removeLastBuild", did you mean "numToKeepStr"? @ line 30, column 73. Str: '2', daysToKeepStr: '7', removeLast
This makes multibranch pipelines unusable, as builds for stale branches are never discarded.
Discovered in JENKINS-36364
Environment
Jenkins 4.462
- blocks
-
JENKINS-36364 Artifactory DSL set discardOldBuilds to true in multibranch pipeline Jenkinsfile
- Resolved
- is caused by
-
JENKINS-2417 lastStableBuild not preserved
- Closed
-
JENKINS-68822 Don't keep Build Discarder/Logrotator's last stable/successful builds forever
- Closed
- is related to
-
JENKINS-35642 Multibranch plugin is missing "Discard Old Builds"
- Closed