How to manipulate PATH for jenkins outside of jenkins

23 views
Skip to first unread message

Dieter Blomme

unread,
May 4, 2015, 3:59:39 AM5/4/15
to jenkins...@googlegroups.com
Hi,

I need to run jobs where the PATH is set by the server itself (e.g. by .bashrc), so it can be manipulated by chef/puppet/... At this point, I can't figure out how to do this, since jenkins runs the shell scripts inside a job as non-interactive, non-login shells. Part of the jobs are running bundle install and bundle exec compass compile, which requires the PATH to be set properly. What is the best way to do this, keeping in mind server install and manipulation is through provisioning tools (no manual steps)?
I have researched the BASH_ENV, it doesn't seem usable. 
I have tried using a /etc/profile.d/path.sh file and sourcing /etc/profile as a first step in the build process, that works, but seems to be very funky.

Dieter Blomme

unread,
May 4, 2015, 4:03:58 AM5/4/15
to jenkins...@googlegroups.com
Also important. I use phing. Which means that sourcing a file won't help, since that is done in an Exectask, which is isolated from the other tasks. I can't source a file first and then run another task expecting the env variables to be manipulated.
Reply all
Reply to author
Forward
0 new messages