Because I couldn't use an environment variable that I thought should exist, I printed all the environment variables in my Jenkins Pipeline script:
node { for(e in env) { print "key = ${e.key}, value = ${e.value}" } } This prints:
key = null, value = null
I'm very surprised by this.
Why are there no environment variables?
sh "set".shdoesn't work:nohup: failed to run command "sh": No such file or directory/bin/shdoesn't work eithernode { sh "set" }.