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

API(s) for capturing parameters for parametrised pipeline jobs

    XMLWordPrintable

    Details

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

      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

            michaelneale Michael Neale created issue -
            michaelneale Michael Neale made changes -
            Field Original Value New Value
            Epic Link JENKINS-38490 [ 174672 ]
            michaelneale Michael Neale made changes -
            Sprint atlantic [ 106 ]
            michaelneale Michael Neale made changes -
            Link This issue relates to JENKINS-35795 [ JENKINS-35795 ]
            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
            michaelneale Michael Neale made changes -
            Link This issue blocks JENKINS-38805 [ JENKINS-38805 ]
            michaelneale Michael Neale made changes -
            Sprint atlantic [ 106 ]
            michaelneale Michael Neale made changes -
            Sprint indian [ 126 ]
            michaelneale Michael Neale made changes -
            Rank Ranked higher
            jamesdumay James Dumay made changes -
            Sprint indian [ 126 ] arctic [ 131 ]
            jamesdumay James Dumay made changes -
            Sprint arctic [ 131 ] arctic 2 [ 136 ]
            jamesdumay James Dumay made changes -
            Sprint arctic 2 [ 136 ] arctic [ 131 ]
            jamesdumay James Dumay made changes -
            Sprint arctic [ 131 ] arctic 2 [ 136 ]
            jamesdumay James Dumay made changes -
            Sprint tasman [ 136 ] arctic [ 131 ]
            jamesdumay James Dumay made changes -
            Rank Ranked lower
            jamesdumay James Dumay made changes -
            Assignee Vivek Pandey [ vivek ]
            jamesdumay James Dumay made changes -
            Rank Ranked lower
            jamesdumay James Dumay made changes -
            Labels api
            jamesdumay James Dumay made changes -
            Sprint arctic [ 131 ] indian [ 126 ]
            jamesdumay James Dumay made changes -
            Rank Ranked lower
            jamesdumay James Dumay made changes -
            Rank Ranked higher
            jamesdumay James Dumay made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            michaelneale Michael Neale made changes -
            Rank Ranked higher
            jamesdumay James Dumay made changes -
            Sprint indian [ 126 ] indian, arctic [ 126, 131 ]
            jamesdumay James Dumay made changes -
            Sprint indian, arctic [ 126, 131 ] indian, arctic, tasman [ 126, 131, 136 ]
            jamesdumay James Dumay made changes -
            Sprint indian, arctic, tasman [ 126, 131, 136 ] indian, arctic, tasman, frank [ 126, 131, 136, 156 ]
            jamesdumay James Dumay made changes -
            Sprint indian, arctic, tasman, frank [ 126, 131, 136, 156 ] indian, arctic, tasman, tethys [ 126, 131, 136, 161 ]
            jamesdumay James Dumay made changes -
            Rank Ranked lower
            michaelneale Michael Neale made changes -
            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
            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:

            {noformat}
            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"
            {noformat}
            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 to run it, it will show the form in classic:

            michaelneale Michael Neale made changes -
            michaelneale Michael Neale made changes -
            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:

            {noformat}
            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"
            {noformat}
            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 to run it, it will show the form in classic:

             !Screen Shot 2016-12-21 at 7.14.43 pm.png|thumbnail! 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:

            {noformat}
            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"
            {noformat}
            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 to run it, it will show the form in classic:

             !Screen Shot 2016-12-21 at 7.14.43 pm.png|thumbnail!

            michaelneale Michael Neale made changes -
            Description  !Screen Shot 2016-12-21 at 7.14.43 pm.png|thumbnail! 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:

            {noformat}
            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"
            {noformat}
            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 to run it, it will show the form in classic:

             !Screen Shot 2016-12-21 at 7.14.43 pm.png|thumbnail!

             !Screen Shot 2016-12-21 at 7.14.43 pm.png|thumbnail! 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:

            {noformat}
            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"
            {noformat}
            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:

             !Screen Shot 2016-12-21 at 7.14.43 pm.png|thumbnail!

            vivek Vivek Pandey made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            vivek Vivek Pandey made changes -
            Sprint indian, arctic, tasman, tethys [ 126, 131, 136, 161 ] indian, arctic, tasman, frank [ 126, 131, 136, 156 ]
            vivek Vivek Pandey made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            jamesdumay James Dumay made changes -
            Sprint indian, arctic, tasman, frank [ 126, 131, 136, 156 ] indian, arctic, tasman, frank, christmas [ 126, 131, 136, 156, 176 ]
            vivek Vivek Pandey made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]

              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: