-
Bug
-
Resolution: Unresolved
-
Minor
-
jenkins v2.77, pipeline 2.5 (and all deps associated with that)
Very occasionally – maybe once every 4-5 months, on a job that's run about a dozen times per day – I'll get a "no such property" error for a property that's defined in a loaded file.
Our code is something like this:
alertMsgs = load("${pwd()}@script/jobs/constants.groovy");
echo(alertMsgs.SUCCESS);
and jobs/constants.groovy looks like this:
SUCCESS = "...";
return this;
Normally this works exactly as expected, but every so often we get this stacktrace:
groovy.lang.MissingPropertyException: No such property: SUCCESS for class: groovy.lang.Binding
at groovy.lang.Binding.getVariable(Binding.java:63)
at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onGetProperty(SandboxInterceptor.java:224)
at org.kohsuke.groovy.sandbox.impl.Checker$4.call(Checker.java:241)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:238)
at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.getProperty(SandboxInvoker.java:28)
at com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:20)
at WorkflowScript.finishWithSuccess(WorkflowScript:732)
at onMaster.call(/mnt/jenkins_jobs/deploy/jobs/deploy-webapp/builds/882/libs/kautils/vars/onMaster.groovy:12)
at withTimeout.call(/mnt/jenkins_jobs/deploy/jobs/deploy-webapp/builds/882/libs/kautils/vars/withTimeout.groovy:60)
What could be causing this?