How do you access parameters
set in the "This build is parameterized" section of a "Workflow" Jenkins job?
TEST CASE
- Create a WORKFLOW job.
- Enable "This build is parameterized".
- Add a STRING PARAMETER
foo
with default valuebar text
. -
Add the code below to
Workflow Script
:node() { print "DEBUG: parameter foo = ${env.foo}" }
- Run job.
RESULT
DEBUG: parameter foo = null
Best Answer
I think the variable is available directly, rather than through env, when using Workflow plugin. Try: