I have created a basic declarative pipeline on Jenkins. When I run the build it spits outs the following error
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:2)
at ___cps.transform___(Native Method)
The Jenkins Server is set to default with the default plugins which are at the latest version. The Jenkinsfile is shown below
pipeline {
agent any
stages {
stage('Sample Stage') {
steps {
sh '''
ls
'''
}
}
}
}
It looks like the pipeline
block is failing when Jenkins reads the Jenkinsfile which is rather confusing at the Jenkinsfile looks fine to me.