--Fred --------------------------------------------------------------------- Fred Stluka -- mailto:fr...@bristle.com -- http://bristle.com/~fred/ Bristle Software, Inc -- http://bristle.com -- Glad to be of service! Open Source: Without walls and fences, we need no Windows or Gates. ---------------------------------------------------------------------
On Thu, Jun 9, 2011 at 4:19 PM, hhuynh <hhu...@gmail.com> wrote:
> Does anyone know what might be wrong when Jenkins won't run .bashrc
> or .bash_profile after it ssh into a slave (Suse10 box)?
Most likely a user error. Are you certain the $SHELL is bash on the
SuSE10 box? Is /etc/profile dramatically different?
> I have other redhat slaves configuring the same way and the .bashrc is
> executed and printed out on Jenkins log but not this Suse10 box.
User error further confirmed that it is not likely to be a Jenkins
issue because you confirm it is working on other Linux slaves.
-Jesse
--
There are 10 types of people in this world, those
that can read binary and those that can not.
You should study the bash man page paying attention to which files bash executes for non-login, non-interactive shells. Then check those files and find why they don't work the way you expect them to.
IMHO bash does not execute .bashrc for non-interactive non-login shells. If it does on your other slaves, then they have something special in their bash.
By the way, are you sure the login shell is bash?
Sami
> I can confirm that it's running bash. My redhat, suse 10 32bit and
> windows slaves (using sshd cygwin) are all executing .bashrc file
> (or .bash_profile which in turn runs .bashrc) without any extra
> setup.
>
> Only this particular Suse 10 64bit that giving me problem. I
> understand it's not Jenkins problem but sometimes I wish Jenkins
> allows me to specify a command to run during its ssh session. That
> way, I can make Jenkins run "bash -l" as part of its ssh command.
>
Does the user you're using to log into the SUSE 10 slave have a password set?
I've run into issues before with openSUSE where my SSH logins were "funky" when
accessing it over SSH
- R. Tyler Croy
--------------------------------------
Code: http://github.com/rtyler
Chatter: http://identi.ca/agentdero
http://twitter.com/agentdero
You can choose to change the slave type from ssh slave to "execute command on the master". Then you can specify the command as: ssh HOST 'bash -l -c "java -jar slave.jar"'
The downside is that you have copy slave.jar to the host and also update it when you upgrade Jenkins.
Another workaround is to define the environment variables you normally have in .bashrc in the Jenkins slave node settings.
-- Sami