How to access parameters in a Parameterized Build?
问题 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 value bar text . Add the code below to Workflow Script : node() { print \"DEBUG: parameter foo = ${env.foo}\" } Run job. RESULT DEBUG: parameter foo = null 回答1: I think the variable is available directly, rather than through env, when using Workflow plugin. Try: node() {