More in general the parameters of the "previous" run are used.
We have seen this when playing around with some kind of "dynamic value" for a parameter.
We have a single (declarative) Pipeline which has a parameter to enable a DEBUG build.
During the continuous CI builds, DEBUG mode is enabled, i.e. the `BUILD_DEBUG` parameter to false.
On a nightly build, we set the `BUILD_DEBUG` parameter to false.
We now see that:
- the "nightly build" correctly sets the parameter to false
- and the "daily builds" correctly set it to true.
- but the parameter value is only applied in the next build !
- The "nightly build" still uses `DEBUG_BUILD=true`
- While the first "daily build" uses `DEBUG_BUILD=false`
I.e. When creating a new branch this applies too:
(FYI: We use the Multibranch pipeline plugin on subversion repositories)
The first build has no "previous build"and thus "no parameters"
Which exactly explains what is seen on the first build of a (declarative) pipeline.
In my opinion the `parameters` must be defined and applied on the current build.
I hope this information is of any use for you!
We will look for a workaround for now, but it would be great to see this fixed.
Thank you in advance for the effort!
With best regards,