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

Support ExtendedChoiceParameterDefinition plugin

    Details

    • Similar Issues:

      Description

      I have a pipeline step which has the following code for a input step :

      dynamicInput = input id: 'dynamicInput', message: 'Fill the form & wait for approval from EP', ok: 'Request', parameters: [
                       [$class: 'ChoiceParameterDefinition', choices: 'centos6\ncentos7\nrhel6\nrhel7', description: 'Select the os your job targets', name: 'OS'],
                       [$class: 'ChoiceParameterDefinition', choices: 'x86_64\ni386\nnoarch', description: 'Select the architecture your job targets', name: 'Arch'],
                       [$class: 'ChoiceParameterDefinition', choices: 'java\nnodejs', description: 'Select the type of singlebuild job', name: 'JobType'],
                       [$class: 'StringParameterDefinition', defaultValue: "sample_name", description: 'Enter the app name(lower snake_case only - https://en.wikipedia.org/wiki/Snake_case)', name: 'AppName'],
                       [$class: 'StringParameterDefinition', defaultValue: "", description: 'Enter the list of files you want to package as part of artifact', name: 'FileList'],
                       [$class: 'StringParameterDefinition', defaultValue: "", description: 'Enter the Directory name for artifacts', name: 'DirName'],
                       [$class: 'StringParameterDefinition', defaultValue: "https://github.net/organization/reponame.git", description: 'Https Git url for your repository', name: 'GitUrl'],
                       taxonomy,
                       [$class: 'StringParameterDefinition', defaultValue: "", description: 'Enter team slack channel name for notifications', name: 'SlackChannel'],
                       [$class: 'StringParameterDefinition', defaultValue: "", description: 'Enter team slack channel token for notifications', name: 'SlackToken'],
      submitterParameter: "submittedby"
                       echo ("input is : " + dynamicInput)
      

      The taxonomy here is a global groovy function from the workflow library (https://github.com/jenkinsci/workflow-cps-global-lib-plugin). The code behind the taxonomy keyword sits in jenkins and is basically this:

      import com.cwctravel.hudson.plugins.extended_choice_parameter.ExtendedChoiceParameterDefinition
      
      def call(body) {
        node ('xxx') {
          def taxonomy = new ExtendedChoiceParameterDefinition("Taxonomy",
                                                                ExtendedChoiceParameterDefinition.PARAMETER_TYPE_SINGLE_SELECT,
                                                                null,
                                                                null,
                                                                null,
                                                                null,
                                                                env.JENKINS_HOME+"/workflow-libs/src/ep/taxonomylist.groovy",
                                                                null,
                                                                null,
                                                                null,
                                                                null,
                                                                null,
                                                                null,
                                                                null,
                                                                null,
                                                                null,
                                                                null,
                                                                null,
                                                                null,
                                                                null,
                                                                null,
                                                                null,
                                                                null,
                                                                null,
                                                                null,
                                                                null,
                                                                false,
                                                                false,
                                                                5,
                                                                null,
                                                                null)
      
          return taxonomy
        }
      }
      

      Now as I use this in classic view , it succeeds and the input step gives me the drop down for taxonomy ( the whole list of views), but in blue ocean plugin this fails and gives me an error instead of a dropdown : No component found for PT_SINGLE_SELECT

      The issue obviously is blue ocean just supporting the following types of inputs: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-dashboard/src/main/js/components/parameter/index.js#L10

      It needs to support custom type as well.

        Attachments

          Issue Links

            Activity

            kaulk Kuber Kaul created issue -
            jamesdumay James Dumay made changes -
            Field Original Value New Value
            Rank Ranked higher
            jamesdumay James Dumay made changes -
            Summary blue ocean pipeline input step doesnt support custom groovy global function. Support PARAMETER_TYPE_SINGLE_SELECT type
            jamesdumay James Dumay made changes -
            Epic Link JENKINS-40108 [ 176745 ]
            michaelneale Michael Neale made changes -
            Epic Link JENKINS-40108 [ 176745 ] JENKINS-38490 [ 174672 ]
            michaelneale Michael Neale made changes -
            Epic Link JENKINS-38490 [ 174672 ] JENKINS-40108 [ 176745 ]
            michaelneale Michael Neale made changes -
            Priority Blocker [ 1 ] Major [ 3 ]
            kaulk Kuber Kaul made changes -
            Assignee Vivek Pandey [ vivek ]
            jamesdumay James Dumay made changes -
            Issue Type Bug [ 1 ] Improvement [ 4 ]
            kaulk Kuber Kaul made changes -
            Assignee Vivek Pandey [ vivek ]
            jamesdumay James Dumay made changes -
            Summary Support PARAMETER_TYPE_SINGLE_SELECT type Support ExtendedChoiceParameterDefinition plugin
            jamesdumay James Dumay made changes -
            Link This issue is duplicated by JENKINS-43898 [ JENKINS-43898 ]
            leang07 Leandro Garcia made changes -
            Priority Major [ 3 ] Critical [ 2 ]

              People

              • Assignee:
                Unassigned
                Reporter:
                kaulk Kuber Kaul
              • Votes:
                8 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated: