Are you using declarative or scripted pipeline?
In declarative, I have found I can reference env vars configured in Jenkins in the environment section to set up job level environment:
environment {
jobVar = env.SOME_VAR
}
But I haven't checked if these job level environment variables are available in a script section that runs with 'agent none'
Most of the job work is done on a node / agent for my pipelines.
Bill
Bill
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/27dd108d-2119-4879-9ffe-6a9ef16b3bd7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.