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

API(s) for capturing parameters for parametrised pipeline jobs

    Details

    • Similar Issues:
    • Epic Link:
    • Sprint:
      indian, arctic, tasman, frank, christmas

      Description

      Parametrised jobs require input before they can start. An api needs to exist that exposes what parameters are required, and the "run pipeline" api needs to be enhanced to take these parameters.

      In scope:

      • Show if a pipeline takes parameters before it can launch (this may ideally be returned in a pipeline listing/pipeline object, so that when the user presses a run button it can pop up immediately asing for input)
      • API to show what parameters are required (and their types)
      • Enhance run api to take parameters.

      Out of scope:

      • GUI stuff

      Sample pipeline that requests all types of input that need to be supported:

      properties([parameters([booleanParam(defaultValue: false, description: 'this is bool', name: 'boolParam'), choice(choices: 'a\nb\nc', description: 'this is choice ', name: 'choiceThing'), text(defaultValue: 'defaultval', description: 'this is multiline', name: 'multiLIne'), password(defaultValue: 'nada', description: 'This is password', name: 'pass'), string(defaultValue: 'defaultparam', description: 'This is string param', name: 'stringParam')]), pipelineTriggers([])])
      
      echo "yeah"
      

      NOTE: to get jenkins to ask for input - you have to run this pipeline once to set the input required config in Jenkins. After that, the next time you run it, it will show the form in classic:

        Attachments

          Issue Links

            Activity

            Hide
            michaelneale Michael Neale added a comment -

            This may be related to input capture api - or may be able to reuse some of the code Vivek Pandey to investigate

            Show
            michaelneale Michael Neale added a comment - This may be related to input capture api - or may be able to reuse some of the code Vivek Pandey to investigate

              People

              • Assignee:
                vivek Vivek Pandey
                Reporter:
                michaelneale Michael Neale
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: