ssh builds: wrong HOST and USER environment variables set.

5 views
Skip to first unread message

Stuart Reynolds

unread,
Feb 5, 2015, 3:31:53 PM2/5/15
to jenkins...@googlegroups.com
I think I'm seeing a bug in the ssh build module.


I'm using the "Execute shell script on a remote host using ssh" build option.
Suppose I chose:

    builder@buildmachine:22

as the ssh target.
Now when jenkins runs, it automatically prefixes the script with the environment variables:

  USER="jenkins"
  HOME="/var/lib/jenkins"

... which are incorrect (since I ssh-d in as builder, not jenkins)

Is there a way to stop jenkins prefixing the remote shell job with these values?

I don't have any properties set in: 
   /configure
      > Global properties.

I understand that I can override the values in my script text as follows

   export USER=`whoami` && export HOME=/home/$USER && source /home/builder/.bashrc

though its a PITA to do for each ssh job.

Thanks.
- Stu
Reply all
Reply to author
Forward
0 new messages