-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Jenkins 2.281
BuildRotator 1.2
I am trying to use BuildRotator on declarative pipeline but don't have success.
First try
options
{ buildDiscarder([$class: 'BuildRotator', artifactsDaysToKeep: -1, artifactsNumToKeep: -1, daysToKeep: -1, numToKeep: 10])) }This is generated by jenkins snippet generator, but doesn't work because buidDiscarder does not support $class anymore.
Second try is
options
{ buildDiscarder(BuildRotator(artifactsDaysToKeep: -1, artifactsNumToKeep: -1, daysToKeep: -1, numToKeep: 10)) }This is like the sintax generated for logRotation plugin but doesn't work too because jenkins can't find BuildRotator
Is there any way to use it in declarative pipeline? If not, can this be implemented?