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

Offer "Build with Parameters" on first build when declarative Jenkinsfile found

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      By default a branch project will automatically run the first build, with no parameters, so params will just pick up any default values. You have the option to suppress the automatic first build, but this does not give you any way to enter parameters for it (at least in the UI; perhaps possible via CLI/REST), since Jenkins does not know what the parameters are going to be until it starts running. But in the case of Declarative we could in principle inspect the Jenkinsfile when the branch project is created (via SCMFileSystem) and determine the parameter definitions by static parsing without actually running.

      More generally, if Declarative is in use and there are properties, we could set all the project properties when the branch project is created, even if the first build is run automatically. (Though I would suggest that the automatic first build should be automatically suppressed if there is a ParametersDefinitionProperty.)

        Attachments

          Issue Links

            Activity

            jglick Jesse Glick created issue -
            jglick Jesse Glick made changes -
            Field Original Value New Value
            Link This issue relates to JENKINS-41865 [ JENKINS-41865 ]
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-42922 [ JENKINS-42922 ]
            abayer Andrew Bayer made changes -
            Link This issue is duplicated by JENKINS-40241 [ JENKINS-40241 ]
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-45454 [ JENKINS-45454 ]
            childnode Marcel 'childNo͡.de' Trautwein made changes -
            Link This issue is duplicated by JENKINS-42922 [ JENKINS-42922 ]
            childnode Marcel 'childNo͡.de' Trautwein made changes -
            Link This issue duplicates JENKINS-40574 [ JENKINS-40574 ]
            abayer Andrew Bayer made changes -
            Link This issue is duplicated by JENKINS-40574 [ JENKINS-40574 ]
            abayer Andrew Bayer made changes -
            Link This issue is duplicated by JENKINS-46594 [ JENKINS-46594 ]
            darwinjs Darwin Sanoy made changes -
            Comment [ Parameters prompting is also skipped when you simply run a declarative pipeline (that contains a parameters block) from the classic UI.  Since everything else about Declarative Pipelines seems to work in Classic UI, I'm thinking this is a bug.

            Perhaps the two are related since "Scan Multibranch Pipeline Now" is only available on Classic UI ? ]
            jamesdumay James Dumay made changes -
            Remote Link This issue links to "CloudBees Internal OSS-2277 (Web Link)" [ 18360 ]
            jamesdumay James Dumay made changes -
            Remote Link This issue links to "CloudBees Internal OSS-2103 (Web Link)" [ 18419 ]
            jglick Jesse Glick made changes -
            Link This issue relates to JENKINS-49079 [ JENKINS-49079 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "CloudBees Internal OSS-2103 (Web Link)" [ 18419 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "CloudBees Internal OSS-2277 (Web Link)" [ 18360 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "CloudBees-internal CD-559 (Web Link)" [ 20776 ]
            cloudbees CloudBees Inc. made changes -
            Remote Link This issue links to "CloudBees Internal OSS-2103 (Web Link)" [ 20783 ]
            jglick Jesse Glick made changes -
            Labels multibranch
            rodrigc Craig Rodrigues made changes -
            Link This issue is related to JENKINS-52939 [ JENKINS-52939 ]

              People

              • Assignee:
                abayer Andrew Bayer
                Reporter:
                jglick Jesse Glick
              • Votes:
                85 Vote for this issue
                Watchers:
                98 Start watching this issue

                Dates

                • Created:
                  Updated: