Open uchuugaka opened 7 years ago
The default value used to preset the parameter is fetched from the previous (successful) build. Thus the default value specified in the parameter definition is ignored, unless there's no such previous build. That is, removing all builds will reset the parameter to its configured default value.
Still I consider this to be an issue that has to be addressed.
We reorder the list of choices regularly to assign different environments, but as the info is persisted, this will keep running with the previous environment as long as nobody starts the job manually, selecting the correct value.
You can argue: Well, just run the job with the new value, it will stick - but unfortunately this is only half the solution, new branches without previous builds would still pick up the outdated default and run with the old environment.
Another use case is that by using booleanParam, the job can skip over certain test steps - think of ways to quickly go to the part that needs debugging. One would usually not keep this selection of skipped tests indefinitely.
I'd really prefer to make sticky parameter behaviour explicit with a parameter for any of the parameter calls.
There isn’t an obvious function to reset this as far as I can tell. Is there a recommended means to say “default” value ? Imagine running a suite of jobs. Maybe in Pipeline form, or in the Radiator form. There might not be a simple answer.