-
New Feature
-
Resolution: Unresolved
-
Minor
-
jenkins 2.220, running in kubernetes, using declarative pipelines & multi-branch pipelines
It's a massive bugbear for me and I'm sure many others.. having to build a pipeline once before you can 'Build with Parameters'.
It could be as simple as checking out just the jenkinsfile(s) during the repository scan and load the parameters before the first build (obviously as an option to enable it as it would slow down the repository scan).
Alternatively, give us a 'load/refresh parameters' button that starts the pipeline but only until it has got the parameters and then stops by itself before doing any build steps.
This is not necessary if you are using the Job DSL plugin
(which you should be regardless). Instead of defining the parameters in your Jenkinsfile, put them in the .groovy file where your Job DSL is defined. Then the parameters are available on the initial run of the job.https://jenkinsci.github.io/job-dsl-plugin/
EDIT: Apologies, I wasn't implying that this isn't a valid feature request. However, using the Job DSL allows you to achieve what you are asking, and it makes your life easier in the long run as well.