[ 
https://issues.jenkins-ci.org/browse/JENKINS-12879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=159498#comment-159498
 ] 

gbois commented on JENKINS-12879:
---------------------------------

Instead of use the couple EnvInject/Tool Environment plugin, I suggest you 
should use the coupld EnvInject/SharedObjects plugin. This latest plugin can 
export Toll installations as environment variables.
                
> Verion 1.27 does not work with Tool Environment plugin
> ------------------------------------------------------
>
>                 Key: JENKINS-12879
>                 URL: https://issues.jenkins-ci.org/browse/JENKINS-12879
>             Project: Jenkins
>          Issue Type: Bug
>          Components: envinject
>    Affects Versions: current
>            Reporter: Florian Zschocke
>            Assignee: gbois
>              Labels: plugin
>
> We use the Tool Environment Plugin to set environment variables with path for 
> tools. We used the SetEnv plugin before together with the TE plugin and the 
> tool environment variables could be used in the SetEnv configuration. This 
> does not work with the EnvInject plugin, which is supposed to replace the 
> SetEnv plugin.
> Configuration:
> We have tool environment variables
> MAVEN_2_2_1_HOME
> JAVA_IBM_60_81_HOME
> ANT_1_6_5_HOME
> The SetEnv plugin set the environment for a build using these:
> PROJECT_TOP=${WORKSPACE}
> PROJECT_BUILD=$PROJECT_TOP/build
> PROJECT_RES=$PROJECT_TOP/delivery
> PROJECT_SRC=$PROJECT_TOP
> JAVA_HOME=${JAVA_IBM_60_81_HOME}
> PATH=${JAVA_HOME}/bin:${MAVEN_2_2_1_HOME}/bin:${ANT_1_6_5_HOME}/bin:$PATH
> This would work.
> Using the EnvInject plugin on a new Jenksin 1.451 installation, I was so far 
> not able to find any configuration which would work. The EnvInject plugin 
> does not see the tool environment variables, or the PATH variable. This are 
> the results:
> [EnvInject] - Injecting environment variables from a build step.
> [EnvInject] - Injecting as environment variables the properties content 
> BRANCH=trunk
> PROJECT_TOP=${WORKSPACE}
> PROJECT_BUILD=$PROJECT_TOP/build
> PROJECT_RES=$PROJECT_TOP/delivery
> PROJECT_SRC=$PROJECT_TOP
> JAVA_HOME=${JAVA_IBM_60_81_HOME}
> PATH=${JAVA_HOME}/bin:${MAVEN_2_2_1_HOME}/bin:${ANT_1_6_5_HOME}/bin:$PATH
> [EnvInject] - Variables injected successfully.
> [EnvInject] - Unset unresolved 'JAVA_HOME' variable.
> [EnvInject] - Unset unresolved 'PATH' variable.
> Setting ANT_1_6_5_HOME=/data/sourcecode/cbe-tools/ant/1.6.5
> Setting MAVEN_2_2_1_HOME=/data/sourcecode/cbe-tools/maven/2.2.1
> Setting JAVA_IBM_60_81_HOME=/data/build-env/java/ibm-java2-i386-6.0.8.1
> or:
> [EnvInject] - Executing scripts and injecting environment variables after the 
> SCM step.
> [EnvInject] - Executing and processing the following script content: 
> BRANCH=trunk
> PROJECT_TOP=${WORKSPACE}
> PROJECT_BUILD=$PROJECT_TOP/build
> PROJECT_RES=$PROJECT_TOP/delivery
> PROJECT_SRC=$PROJECT_TOP
> JAVA_HOME=${JAVA_IBM_60_81_HOME}
> PATH=${JAVA_HOME}/bin:${MAVEN_2_2_1_HOME}/bin:${ANT_1_6_5_HOME}/bin:$PATH
> [hourly] $ /bin/sh -xe /tmp/hudson6496656756456228415.sh
> + BRANCH=trunk
> + PROJECT_TOP=/data/sourcecode/domain/trunk/hourly
> + PROJECT_BUILD=/data/sourcecode/domain/trunk/hourly/build
> + PROJECT_RES=/data/sourcecode/domain/trunk/hourly/delivery
> + PROJECT_SRC=/data/sourcecode/domain/trunk/hourly
> + JAVA_HOME=
> + 
> PATH=/bin:/bin:/bin:/data/build-env/java/ibm-java2-i386-6.0.8.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin
> [EnvInject] - Script executed successfully.
> Setting ANT_1_6_5_HOME=/data/sourcecode/cbe-tools/ant/1.6.5
> Setting MAVEN_2_2_1_HOME=/data/sourcecode/cbe-tools/maven/2.2.1
> Setting JAVA_IBM_60_81_HOME=/data/build-env/java/ibm-java2-i386-6.0.8.1
> This came closest, but the PATH variable cannot be seen:
> [EnvInject] - Injecting environment variables from a build step.
> Setting ANT_1_6_5_HOME=/data/sourcecode/cbe-tools/ant/1.6.5
> Setting MAVEN_2_2_1_HOME=/data/sourcecode/cbe-tools/maven/2.2.1
> Setting JAVA_IBM_60_81_HOME=/data/build-env/java/ibm-java2-i386-6.0.8.1
> [EnvInject] - Injecting as environment variables the properties content 
> BRANCH=trunk
> PROJECT_TOP=${WORKSPACE}
> PROJECT_BUILD=$PROJECT_TOP/build
> PROJECT_RES=$PROJECT_TOP/delivery
> PROJECT_SRC=$PROJECT_TOP
> JAVA_HOME=${JAVA_IBM_60_81_HOME}
> PATH=${JAVA_HOME}/bin:${MAVEN_2_2_1_HOME}/bin:${ANT_1_6_5_HOME}/bin:$PATH
> [EnvInject] - Variables injected successfully.
> [EnvInject] - Unset unresolved 'PATH' variable.
> Setting ANT_1_6_5_HOME=/data/sourcecode/cbe-tools/ant/1.6.5
> Setting MAVEN_2_2_1_HOME=/data/sourcecode/cbe-tools/maven/2.2.1
> Setting JAVA_IBM_60_81_HOME=/data/build-env/java/ibm-java2-i386-6.0.8.1

--
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