-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major
-
Component/s: buildrotator-plugin
-
None
-
Environment: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?