-
Bug
-
Resolution: Cannot Reproduce
-
Major
-
None
-
Ubuntu 12.04 LTS master SSH connecting Windows Server 2008 and Windows Server 2012 slaves with Cygwin installed
I have tried updating
/home/<user>/.bashrc
/home/<user>/.bash_profile
/home/<user>/.profile
/etc/profile
/etc/bash.bashrc
And none of them are reflected in the log output. I'm unable to determine how Jenkins is getting the env vars once it is able to SSH into my Cygwin Windows machine. If I knew what environment file it was reading, I could perhaps work around this.
Here is the output from the Jenkins UI log console...note that there are some env vars specified
[04/16/13 21:22:35] [SSH] Authentication successful.
[04/16/13 21:22:35] [SSH] The remote users environment is:
ALLUSERSPROFILE='C:\ProgramData'
BASH=/bin/bash
BASHOPTS=cmdhist:extquote:force_fignore:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath
BASH_ALIASES=()
BASH_ARGC=()
BASH_ARGV=()
BASH_CMDS=()
BASH_EXECUTION_STRING=set
BASH_LINENO=()
BASH_SOURCE=()
BASH_VERSINFO=([0]="4" [1]="1" [2]="10" [3]="4" [4]="release" [5]="i686-pc-cygwin")
BASH_VERSION='4.1.10(4)-release'
COMPUTERNAME=GLIM-WIN2K12-1
COMSPEC='C:\Windows\system32\cmd.exe'
CYGWIN='binmode ntsec'
DIRSTACK=()
EUID=500
GROUPS=()
HOME=/home/Administrator
HOMEDRIVE=C:
HOMEPATH='\cygwin\home\Administrator'
HOSTNAME=GLIM-WIN2K12-1
HOSTTYPE=i686
IFS=$' \t\n'
LOGNAME=Administrator
LOGONSERVER='
GLIM-WIN2K12-1'
MACHTYPE=i686-pc-cygwin
MAIL=/var/spool/mail//Administrator
OPTERR=1
OPTIND=1
OS=Windows_NT
OSTYPE=cygwin
PATH=/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/bin
PATHEXT='.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC'
PIPESTATUS=([0]="0")
PPID=3076
PROGRAMFILES='C:\Program Files (x86)'
PS4='+ '
PWD=/home/Administrator
SHELL=/bin/bash
SHELLOPTS=braceexpand:hashall:interactive-comments
SHLVL=1
SSH_CLIENT='10.14.209.192 52903 22'
SSH_CONNECTION='10.14.209.192 52903 10.14.210.91 22'
SYSTEMDRIVE=C:
SYSTEMROOT='C:\Windows'
TERM=dumb
UID=500
USER=Administrator
USERDOMAIN=GLIM-WIN2K12-1
USERNAME=Administrator
USERPROFILE='C:\Users\Administrator'
WINDIR='C:\Windows'
Here is the output when I simply SSH into the machine. They differ and in this one, the path to the Java JDK works.
$ env | sort
_=/usr/bin/env
ALLUSERSPROFILE=C:\ProgramData
COMPUTERNAME=GLIM-WIN2K12-1
COMSPEC=C:\Windows\system32\cmd.exe
CYGWIN=binmode ntsec
HOME=/home/Administrator
HOMEDRIVE=C:
HOMEPATH=\cygwin\home\Administrator
HOSTNAME=GLIM-WIN2K12-1
INFOPATH=/usr/local/info:/usr/share/info:/usr/info:
LANG=en_US.UTF-8
LOGNAME=Administrator
LOGONSERVER=
GLIM-WIN2K12-1
MAIL=/var/spool/mail//Administrator
MANPATH=/usr/local/man:/usr/share/man:/usr/man::/usr/ssl/man
OLDPWD=/home/Administrator
OS=Windows_NT
PATH=/usr/local/bin:/usr/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/bin:/blah/:/cygdrive/c/Program Files/Java/jdk1.7.0_17/bin/
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PRINTER=Microsoft XPS Document Writer
PROGRAMFILES=C:\Program Files (x86)
PS1=[\e]0;\w\a]\n[\e[32m]\u@\h [\e[33m]\w[\e[0m]\n\$
PWD=/home/Administrator
SHELL=/bin/bash
SHLVL=1
SSH_CLIENT=10.20.76.6 55831 22
SSH_CONNECTION=10.20.76.6 55831 10.14.210.91 22
SSH_TTY=/dev/pty1
SYSTEMDRIVE=C:
SYSTEMROOT=C:\Windows
temp=
TEMP=/tmp
TERM=xterm
tmp=
TMP=/tmp
TZ=Etc/GMT
USER=Administrator
USERDOMAIN=GLIM-WIN2K12-1
USERNAME=Administrator
USERPROFILE=C:\Users\Administrator
WINDIR=C:\Windows