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

input step's parameter "submitterParameter" not supported

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: blueocean-plugin
    • Labels:
      None
    • Environment:
      beta18/19
    • Similar Issues:
    • Epic Link:
    • Sprint:
      pannonian, iapetus

      Description

      TextParameterDefinition allows the user to specify that the input field should be a "textarea" rather than a "textinput"

      I suspect this was an oversight in James's part to support this standard input type.

      Scope

      • Add support for TextParameterDefinition so that it shows up as a text area on the input screen.
      • Ensure that this also works for Pipeline parameters as well as Pipeline Input

      Original Request
      The following snippet / Jenkinsfile does currently not work with BlueOcean:

      stage('hello') {
        Map feedback = input(submitterParameter: 'submitter', message: "tell me something", parameters: [
          [$class: 'TextParameterDefinition', name: 'text', description: "enter something"]
        ])
      
        echo "Text: ${feedback.text}"
        echo "Submitter: ${feedback.submitter}"
      }
      

      BlueOcean only returns a String with the entered text instead of a Map [text: "..", submitter: ".."] (which in the above code fails with "cannot cast to Map" Exception).

      This works with the traditional Jenkins UI.

        Attachments

          Issue Links

            Activity

            Hide
            stephenking Steffen Gebert added a comment -

            As James asked for a bit more information: I want to have the information about the submitter for the (to me obvious) reason to know who triggered a deployment.

            Maybe one more helpful information: My Jenkins test instance does not use authentication. So I'm anonymous.

            Show
            stephenking Steffen Gebert added a comment - As James asked for a bit more information: I want to have the information about the submitter for the (to me obvious) reason to know who triggered a deployment. Maybe one more helpful information: My Jenkins test instance does not use authentication. So I'm anonymous .
            Hide
            stephenking Steffen Gebert added a comment -

            Thanks for the updates. I think this drifted in a bit different direction now (while the textfield / textarea difference is certainly an issue). I don't are about the text, as you can see in my screen shot, I'm using choices. My point is the submitterParameter that I want to have in return.

            Show
            stephenking Steffen Gebert added a comment - Thanks for the updates. I think this drifted in a bit different direction now (while the textfield / textarea difference is certainly an issue). I don't are about the text, as you can see in my screen shot, I'm using choices. My point is the submitterParameter that I want to have in return.
            Hide
            tscherler Thorsten Scherler added a comment -

            Blue response of above pipeline:

                  "input":{  
                     "_class":"io.jenkins.blueocean.rest.impl.pipeline.InputStepImpl",
                     "_links":{  
                        "self":{  
                           "_class":"io.jenkins.blueocean.rest.hal.Link",
                           "href":"/blue/rest/organizations/jenkins/pipelines/scherler/branches/JENKINS-41421-slim/runs/4/nodes/6/steps/7/input/"
                        }
                     },
                     "id":"Eb85f2609af142df9288c3623a621197",
                     "message":"tell me something",
                     "ok":"Proceed",
                     "parameters":[  
                        {  
                           "_class":"hudson.model.TextParameterDefinition",
                           "defaultParameterValue":{  
                              "_class":"hudson.model.StringParameterValue",
                              "name":"text",
                              "value":null
                           },
                           "description":"enter something",
                           "name":"text",
                           "type":"TextParameterDefinition"
                        }
                     ],
                     "submitter":null
                  },
                  "result":"UNKNOWN",
                  "startTime":"2017-02-13T14:26:42.436+0100",
                  "state":"PAUSED"
               }
            
            Show
            tscherler Thorsten Scherler added a comment - Blue response of above pipeline: "input" :{ "_class" : "io.jenkins.blueocean. rest .impl.pipeline.InputStepImpl" , "_links" :{ "self" :{ "_class" : "io.jenkins.blueocean. rest .hal.Link" , "href" : "/blue/ rest /organizations/jenkins/pipelines/scherler/branches/JENKINS-41421-slim/runs/4/nodes/6/steps/7/input/" } }, "id" : "Eb85f2609af142df9288c3623a621197" , "message" : "tell me something" , "ok" : "Proceed" , "parameters" :[ { "_class" : "hudson.model.TextParameterDefinition" , "defaultParameterValue" :{ "_class" : "hudson.model.StringParameterValue" , "name" : "text" , "value" : null }, "description" : "enter something" , "name" : "text" , "type" : "TextParameterDefinition" } ], "submitter" : null }, "result" : "UNKNOWN" , "startTime" : "2017-02-13T14:26:42.436+0100" , "state" : "PAUSED" }
            Hide
            tscherler Thorsten Scherler added a comment -

            Show
            tscherler Thorsten Scherler added a comment -
            Hide
            michaelneale Michael Neale added a comment -

            I am confused, is this about TextParameter or submitter? the title says one thing, the body says another.

            Show
            michaelneale Michael Neale added a comment - I am confused, is this about TextParameter or submitter? the title says one thing, the body says another.
            Hide
            tscherler Thorsten Scherler added a comment -

            See the last paragraph of the 41421 description "...only returns a String"

            Show
            tscherler Thorsten Scherler added a comment - See the last paragraph of the 41421 description "...only returns a String"

              People

              • Assignee:
                tscherler Thorsten Scherler
                Reporter:
                stephenking Steffen Gebert
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: