I think the variable is available directly, rather than through env, when using Workflow plugin.
Try:
node()
{
print "DEBUG: parameter foo = ${foo}"
}
More Related Contents:
- How do you load a groovy file and execute it
- How can I trigger another job from a jenkins pipeline (jenkinsfile) with GitHub Org Plugin?
- Show a Jenkins pipeline stage as failed without failing the whole job
- Strange variable scoping behavior in Jenkinsfile
- Jenkinsfile Declarative Pipeline defining dynamic env vars
- Jenkins dynamic declarative pipeline parameters
- Cannot define variable in pipeline stage
- Active Choices Reactive Reference Parameter in jenkins pipeline
- Closures in Groovy not capturing outside variables
- How to list all `env` properties within jenkins pipeline job?
- How to read properties file from Jenkins 2.0 pipeline script
- Is it possible to create parallel Jenkins Declarative Pipeline stages in a loop?
- How to manipulate the build result of a Jenkins pipeline job (back to ‘SUCCESS’)?
- How do I make a Jenkins job start after multiple simultaneous upstream jobs succeed?
- Is it possible to capture the stdout from the sh DSL command in the pipeline
- “Build Periodically” with a Multi-branch Pipeline in Jenkins
- How to add a timeout step to Jenkins Pipeline
- Jenkins pipeline: agent vs node?
- How to invoke a jenkins pipeline A in another jenkins pipeline B
- How to differentiate build triggers in Jenkins Pipeline
- Determine Failed Stage in Jenkins Declarative Pipeline
- Get absolute path to workspace directory in Jenkins Pipeline plugin
- How to trigger a jenkins build on specific node using pipeline plugin?
- Jenkins pipeline template
- Abort current build from pipeline in Jenkins
- How to implement Post-Build stage using Jenkins Pipeline plug-in?
- How do I pass variables between stages in a declarative Jenkins pipeline?
- Can I create dynamically stages in a Jenkins pipeline?
- Running stages in parallel with Jenkins workflow / pipeline
- Hiding password in Jenkins pipeline script