-
Bug
-
Resolution: Duplicate
-
Major
-
Jenkins 2.49 / pipeline model definition plugin 1.0.2
The environment configuration section declared in the Syntax reference in the wiki seems to contains errors.
We can't made a reference to FOO from OTHER
pipeline { agent any environment { FOO = "bar" OTHER = "${FOO}baz" } stages { stage("first stage") { steps { echo "Hello world" } } } }
because it's thrown this error
groovy.lang.MissingPropertyException: No such property: FOO 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 org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:221) at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:221) at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.getProperty(SandboxInvoker.java:28) at com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:20)
- duplicates
-
JENKINS-41748 Environment variables cross references aren't supported
- Closed