[workflow-plugin] [script-security-plugin] binding variable is not available on sandboxed runs

36 views
Skip to first unread message

Javier Delgado

unread,
Mar 6, 2015, 4:51:08 AM3/6/15
to jenkins...@googlegroups.com
Having this simple workflow definition:

node {
 binding['MYVAR'] = "myvalue"
 echo "${binding.getVariables()} "
}

If ran on a non-sandboxed environment, the output is nice:

[steps:org.jenkinsci.plugins.workflow.cps.DSL@545c26e4, MYVAR:myvalue] 

If ran on a sandboxed environment we get an error:

No such property: binding for class: groovy.lang.Binding

Could this be a similar case as JENKINS-25914? That issue wasw closed on commit 0ee3e93 and related to commit 78563c4.

Regards

Jesse Glick

unread,
Mar 9, 2015, 4:24:43 PM3/9/15
to jenkins...@googlegroups.com
On Friday, March 6, 2015 at 9:51:08 AM UTC, Javier Delgado wrote:
node {
 binding['MYVAR'] = "myvalue"
 echo "${binding.getVariables()} "
}

If ran on a non-sandboxed environment, the output is nice:

[steps:org.jenkinsci.plugins.workflow.cps.DSL@545c26e4, MYVAR:myvalue]

Surprising to me. What is ‘binding’ supposed to be? I do not think this is expected to be supported, at least not in the sandbox.

Javier Delgado

unread,
Mar 9, 2015, 4:58:14 PM3/9/15
to jenkins...@googlegroups.com

From the results is an instance of groovy.lang.Binding. Don't know if it was supposed to be supported but as it works in out-of-sandox mode, here comes the possible idea of it being a bug.
Reply all
Reply to author
Forward
0 new messages