lidiam created JENKINS-13832:
--------------------------------

             Summary: Wrong value is assigned to JAVA_HOME by JDK Installer
                 Key: JENKINS-13832
                 URL: https://issues.jenkins-ci.org/browse/JENKINS-13832
             Project: Jenkins
          Issue Type: Bug
          Components: infrastructure, slave-setup
    Affects Versions: current
         Environment: Master on Linux, slave on Solaris.
            Reporter: lidiam
            Assignee: Kohsuke Kawaguchi


This is version 1.464.

I'm configuring automatic JDK installation from our local server.  I used "Run 
Command" option for the installer, to simply copy the binaries, as in:

echo "===============" && cd $HOME/hudson/tools && pwd && echo "Installing JDK 
in `pwd`" && if [ -d "jdk_1.6.0_32/bin" ]; then echo "JDK already installed, 
skipping installation"; else cp -R <server-location>/binaries/solaris-sparc/* 
jdk_1.6.0_32; fi; echo "==============="

I also specified the following for the Tool Home:

$HOME/hudson/tools/jdk_1.6.0_32

The output of the above is that JDK is copied over fine, but JAVA_HOME is set 
incorrectly to:

JAVA_HOME is  
/export/home/j2eetest/hudson/tools/jdk_1.6.0_32//export/home/j2eetest/hudson/tools/jdk_1.6.0_32

For some reason the path is repeated.  I cannot remove my setting from Tool 
Home, as it is a required field, so not sure how to workaround it, other than 
hardcode JAVA_HOME in the build script later.

Another issue is that the above installer is called 3 times in the build.  
First it, at the beginning of the run, as expected, but then 2 more times after 
the run fails (since JAVA_HOME is set incorrectly):

---------------------
Error: JAVA_HOME is not defined correctly. We cannot execute 
/export/home/j2eetest/hudson/tools/jdk_1.6.0_32//export/home/j2eetest/hudson/tools/jdk_1.6.0_32/bin/java
 
Build step 'Execute shell' marked build as failure 
Archiving artifacts
[jdk_1.6.0_32] $ sh -e 
/export/home/j2eetest/hudson/tools/jdk_1.6.0_32/hudson1565215954249512158.sh 
=============== 
/export/home/j2eetest/hudson/tools 
Installing JDK in /export/home/j2eetest/hudson/tools 
JDK already installed, skipping installation 
=============== 
Collecting JWSDP SQE reports 
[jdk_1.6.0_32] $ sh -e 
/export/home/j2eetest/hudson/tools/jdk_1.6.0_32/hudson9099275328093437047.sh 
=============== 
/export/home/j2eetest/hudson/tools 
Installing JDK in /export/home/j2eetest/hudson/tools 
JDK already installed, skipping installation 
=============== 
Finished: FAILURE 
---------------------


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to