-
Improvement
-
Resolution: Incomplete
-
Minor
-
None
I have a Jenkinsfile that looks roughly like this:
... stage('Build') { steps { script { FOO = sh (script: "echo bar", returnStdout: true) } } } stage('Plan') { steps { sh "FOO=${FOO} ./tests/run.sh" } } ...
Why am I not seeing the variable $FOO within run.sh? This works in a regular shell and bash. Furthermore it's not like Jenkins isn't picking up the value of $FOO. It correctly prints the value of $FOO as "bar" in other places that I've used it.