-
Bug
-
Resolution: Unresolved
-
Minor
-
Jenkins Version: 2.361.1
List Git Branches Parameter Plugin Version: 0.0.11
Red Hat Enterprise Linux
This fix:
Released as part of 0.0.11 breaks pipeline Jenkinsfile setup in 0.0.9 or earlier versions where the listSize parameter was not required. If you try to load a jenkinsfile using list-git-branches-parameter with no listSize parameter in a Jenkins with the 0.0.11 version of the plugin installed Jenkins will throw this error when creating pipeline:
ERROR: (unknown source) the following options are required and must be specified: listSize
Conversely, if you try to load a pipeline Jenkinsfile using list-git-branches-parameter with a listSize parameter in Jenkins running 0.0.9 version of the plugin, Jenkins will also throw an error when creating pipeline:
12:03:57 ERROR: (unknown source) No signature of method: listSize() is applicable for argument types: (java.lang.String) values: [5] 12:03:57 Possible solutions: name(), description(), remoteURL(), credentialsId(), defaultValue(), sortMode(), selectedValue(), quickFilterEnabled(), type(), tagFilter(), branchFilter() 12:03:57 Finished: FAILURE
In organisation where pipeline files are version controlled and dynamically loaded into Jenkins to populate jobs it may be unavoidable to have jobs that want to call the plugin both ways due to Jenkins loading older jenkinsfile as part of a past release tag. Therefore ideally the plugin should handle both cases where listSize could be supplied or may be missing, possibly via overloading the method to make listSize optional.
- links to