Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-69771

0.0.11 release breaks compatibility to 0.0.9 or earlier Jenkinsfile parameter

XMLWordPrintable

      This fix:

      Fix default listSize by rob-ott - Pull Request #13 - jenkinsci/list-git-branches-parameter-plugin - GitHub

      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.

            huangsuoyuan huang suoyuan
            jamesz James Zhu
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: