-
New Feature
-
Resolution: Unresolved
-
Major
-
None
When JobDSL refers to a declarative pipeline with defined parameters, the job is created (and updated) to have no parameters.
Then users need to build once (build will fail), that will cause parameters to be setup. And only then users can run with proper parameters.
This is confusing the users.
In case this is too complicated, one simpler approach would be not to reset parameters when parameters are not specified in the JobDSL. In this way JobDSL update will not cause parameters reset and parameter initialization will happen once when job was created. Later updates will not confuse users.
I see your point Alex, but what you are referring to is a problem in Jenkins pipeline (https://issues.jenkins-ci.org/browse/JENKINS-41929). Compensating that in Job DSL plugin sounds a bit odd. Especially if that means giving up on some of the Job DSL guarantees (job configuration matches declaration exactly and entirely after the seed job have run).