Skip to main content
navin1487

1 year ago

getting below error : while executing 1st pipeline job

groovy.lang.MissingPropertyException: No such property: pipeline for class: groovy.lang.Binding
at groovy.lang.Binding.getVariable(Binding.java:63)
at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:130)
at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:155)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:159)
at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
at WorkflowScript.run(WorkflowScript:1)
at ___cps.transform___(Native Method)
at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:57)
at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109)
at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)

and my Jenkinsfile code is
pipeline {

agent any

stages {
stage ('Build') {
steps {
sh 'ant -f build.xml -v'
}
}
}
}

please help.

Image of aboutflying
aboutflying
1 year ago

There was a recent update to the Jenkins script security plugin that seems to have broken some stuff, see https://stackoverflow.com/questions/52177946/jenkins-multibranch-pipeline-fails-because-it-runs-in-groovy-sandbox


Temp solution is to downgrade the script security plugin manually to 1.44. Go here and download the 1.44 script-security.hpi:  https://updates.jenkins.io/download/plugins/script-security/


Then go to Manage Jenkins -> Manage Plugins -> Advanced -> upload the 1.44 script-security plugin and then restart Jenkins.

Image of navin1487
navin1487
8 months ago
Hi Bill ,
Facing same issue again 
I am using  jenkins version : 2.150.2  and   script-security plugin version : 1.51

1.44 script-security plugin is no longer supported it is forcefully asking to upgrade to latest version i.e 1.50+ version


please help me