To apply environment variables, you have to wrap your code in a withEnv
block, whose argument is an array of strings of the form
'VARIABLE=value'. So you could read the env-setup file and go through
line by line building up an environment array, then use that array
variable in the withEnv block
Good day.
I'm building on Jenkins 2.0 with pipelines and jenkinsfiles from SCM to
achieve continuous delivery for my project.
However I'm facing issues with groovy workflow to source my environment
variables for ansible.
I'm running Ansible from source so I need to run:
$ source ansible/hack