After the upgrade, my pipeline job started failing with the following exception:
groovy.lang.MissingPropertyException: No such property: dryrun for class: WorkflowScript
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:458)
at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.getProperty(DefaultInvoker.java:39)
at com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:20)
at WorkflowScript.run(WorkflowScript:70)
NOTE: WorkflowScript line 70 is the first time I try to access $dryrun in the shell script within the DSL.
The missing parameter 'dryrun' is a boolean parameter that is defaulted to 'false'. It turns out the failure only happens when the job is triggered by message bus. If I trigger it manually, it works fine. This is what leads me to believe that it is the jms-messaging-plugin which is causing the issue. I've also printed the env in the shell scirpt and all boolean params are missing, but other params are present.
As a workaround, I can recreate the parameter 'dryrun' as a string instead of a boolean, and everything works fine.
Here is a snippet of my DSL which may help in reproducing the problem:
I recently upgraded plugins on my Jenkins master:
After the upgrade, my pipeline job started failing with the following exception:
NOTE: WorkflowScript line 70 is the first time I try to access $dryrun in the shell script within the DSL.
The missing parameter 'dryrun' is a boolean parameter that is defaulted to 'false'. It turns out the failure only happens when the job is triggered by message bus. If I trigger it manually, it works fine. This is what leads me to believe that it is the jms-messaging-plugin which is causing the issue. I've also printed the env in the shell scirpt and all boolean params are missing, but other params are present.
As a workaround, I can recreate the parameter 'dryrun' as a string instead of a boolean, and everything works fine.
Here is a snippet of my DSL which may help in reproducing the problem: