It states here:
https://github.com/jenkinsci/workflow-plugin/blob/master/TUTORIAL.md
that:
"*environment variable overrides are currently limited to being global to a 
workflow run, not local to the current thread (and thus slave).*"

Until this changes, what is the recommended approach?

Just collect them and add them to every sh command?

like this:

def localEnv = []
def golang = tool name: 'Go 1.2.2', type: 
'org.jenkinsci.plugins.golang.GolangInstallation'
localEnv.add("export GOROOT=${golang}")
localEnv.add("export PATH=\$PATH:${golang}/bin")
...

sh localEnv.join("\n") + "go build ...."


Cheers,
tim

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/f19db417-40f0-4b17-8d89-a92bf8cd24f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to