I was managing to work around this issue by setting all properties I need at once in the properties{} closure (I generate jobs with Job DSL, and would rather have them set there). This was working fine, until I reached a total blocker: I cannot set the "Trigger builds remotely" token.
In other words, I generate a job that has the token set, but after running the job the token disappears, and there is no pipeline DSL for setting it.
Sorry, correction - even Job DSL plugin no longer handles "Trigger builds remotely" any more in pipelineJobs (seems to only apply to freestyleJob now), so it's not configurable either at generation time or at runtime by any means. I had to downgrade to Job DSL 1.69 due to this, see JENKINS-52743
Jenkins: 2.141, Pipeline-API: 2.29
BTW: I am not using Declarative.
Hi,
I have the same issue. When job finished successfully there is no such issue. After failure all defined parameters are gone.
I tried to add at the beginning of job import hudson.mode.* - didn't help. I t help only if I define parameters in pipeline code - but I cannot use Active Choice Reactive Parameter there. Here is the pipeline code: