Hi,
You are right. This has affected me too, since I use the same technique as
you to figure out if
a parameter exists.
I think that the way that build parameters are accessed inside pipeline
scripts
has been changed in workfow-cps-plugin 2.17 as part of:
I cheat using try/catch:
try{ echo "MyParam is:"+ myParam} catch(ex) { myParam = "default" }
Its ugly, but works. Obviously you can alter this concept to whatever works
for you :-)
-M
On Thursday, September 29, 2016 at 1:37:05 AM UTC-7, Sverre Moe wrote:
>
> I can no longer check if a build
I can no longer check if a build parameter exist before accessing it
This has worked previously before I updated Jenkins and the Pipeline
plugins:
def myParam = false
if (getBinding().hasVariable("MY_PARAM")) {
myParam = Boolean.parseBoolean(MY_PARAM)
}
final def myParam = MY_PARAM
The