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

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

      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.)

          [JENKINS-41929] Offer "Build with Parameters" on first build when declarative Jenkinsfile found

          Jesse Glick created issue -
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-41865 [ JENKINS-41865 ]
          Jesse Glick made changes -
          Link New: This issue is duplicated by JENKINS-42922 [ JENKINS-42922 ]
          Andrew Bayer made changes -
          Link New: This issue is duplicated by JENKINS-40241 [ JENKINS-40241 ]
          Jesse Glick made changes -
          Link New: This issue is duplicated by JENKINS-45454 [ JENKINS-45454 ]
          Marcel 'childNo͡.de' Trautwein made changes -
          Link Original: This issue is duplicated by JENKINS-42922 [ JENKINS-42922 ]
          Marcel 'childNo͡.de' Trautwein made changes -
          Link New: This issue duplicates JENKINS-40574 [ JENKINS-40574 ]
          Andrew Bayer made changes -
          Link New: This issue is duplicated by JENKINS-40574 [ JENKINS-40574 ]
          Andrew Bayer made changes -
          Link New: This issue is duplicated by JENKINS-46594 [ JENKINS-46594 ]
          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 ? ]
          James Dumay made changes -
          Remote Link New: This issue links to "CloudBees Internal OSS-2277 (Web Link)" [ 18360 ]

            Unassigned Unassigned
            jglick Jesse Glick
            Votes:
            168 Vote for this issue
            Watchers:
            180 Start watching this issue

              Created:
              Updated: