报错信息如下:
> git rev-list --no-walk b6b26ffbb80acf8a381afe91470e6476b12e62b5 # timeout=10
SSH: Connecting from host [2bc9c019054a]
SSH: Connecting with configuration [172.16.160.88] ...
SSH: EXEC: STDOUT/STDERR from command [source /makswy/build.sh wy-pmc] ...
/makswy/wy-pmc
Already up-to-date.
which: no javac in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin)
which: no java in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin)
Error: JAVA_HOME is not defined correctly.
We cannot execute
SSH: EXEC: completed after 1,602 ms
SSH: Disconnecting configuration [172.16.160.88] ...
ERROR: Exception when publishing, exception message [Exec exit status not zero. Status [1]]
Build step 'Send files or execute commands over SSH' changed build result to UNSTABLE
Finished: UNSTABLE
JAVA_HOME明明配置在/etc/profile里,可是却找不到,执行脚本的当前用户是root没错啊,不知道什么原因,
反正就是在脚本里,把java的环境变量再配置一遍,就OK了。
[root@wytest makswy]# cat build.sh
JAVA_HOME=/usr/local/jdk1.8.0
export JAVA_HOME
export PATH=${PATH}:${JAVA_HOME}/bin
。。。。