I have a Linux machine that uses user account A.  User account
A's .profile file loads all sorts of useful environment variables.

I've tried to set up this machine as a Jenkins slave using the Launch
slave agents on Unix machines via SSH option:

https://wiki.jenkins-ci.org/display/JENKINS/Distributed+builds#Distributedbuilds-Havemasterlaunchslaveagentviassh

Everything connects fine and user A is connected, but I'm noticing
that none of user A's environment variables are being set.

After some research, I've found that ssh, by default, does not
execute .profile unless you specify the -i (interactive) parameter:

http://stackoverflow.com/questions/216202/why-does-an-ssh-remote-command-get-fewer-environment-variables-then-when-run-man

So I'm trying to figure out how to either get Jenkins to specify -i
when connecting to the machine (looking at the source of
hudson.remoting.Launcher that doesn't seem to be an option) or some
other reusable way to get my user's environment set when
connecting.

This seems to work correctly when using Java Web start to start my
slaves.

Thanks!

Reply via email to