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

            Hide
            leang07 Leandro Garcia added a comment -

            Please fix it, we need it

            Show
            leang07 Leandro Garcia added a comment - Please fix it, we need it
            Hide
            eid Eid Badr added a comment -

            James Dumay is there any new development/work regarding this?

            Show
            eid Eid Badr added a comment - James Dumay is there any new development/work regarding this?
            Hide
            kaulk Kuber Kaul added a comment -

            James Dumay - thanks

            Show
            kaulk Kuber Kaul added a comment - James Dumay - thanks
            Hide
            jamesdumay James Dumay added a comment -

            Kuber Kaul not that this stage. We need to do some more work on our extensibility framework in order to have plugins like Extended Choice plugin be able to add their own elements to Blue Ocean.

            Show
            jamesdumay James Dumay added a comment - Kuber Kaul not that this stage. We need to do some more work on our extensibility framework in order to have plugins like Extended Choice plugin be able to add their own elements to Blue Ocean.
            Hide
            kaulk Kuber Kaul added a comment -

            Any eta on this ?

            Show
            kaulk Kuber Kaul added a comment - Any eta on this ?

              People

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

                Dates

                • Created:
                  Updated: