-
Bug
-
Resolution: Fixed
-
Major
-
None
Jenkins has various tools configured, e.g. Maven 2.2.1. This is injected by the SHaredObjects plugin under the environment variable Maven_2.2.1. This variable is set and present.
This variable can not be used by the EnvInject plugin when setting other variables. I have tried this in the Job and Build sections of the configuration. In both cases the variable referencing ${Maven_2.2.1} was unresolved.
Setting the following property under Job:
MAVEN_BIN=${Maven_2.2.1}/bin
results in
[EnvInject] - Loading node environment variables. [EnvInject] - Preparing an environment for the build. [EnvInject] - Keep Jenkins system variables. [EnvInject] - Keep Jenkins build variables. [EnvInject] - Injecting as environment variables the properties content CMAKE_HOME=${CBE_TOOLS}/cmake MAVEN_BIN=${Maven_2.2.1}/bin [EnvInject] - Variables injected successfully. [SharedObjects] - Injecting tool installations as environment variables [EnvInject] - Unset unresolved 'MAVEN_BIN' variable.
Setting the property under the Build section results in:
[EnvInject] - Loading node environment variables. [EnvInject] - Preparing an environment for the build. [EnvInject] - Keep Jenkins system variables. [EnvInject] - Keep Jenkins build variables. [SharedObjects] - Injecting tool installations as environment variables Building on master in workspace /data/sourcecode/codec/trunk/hourly/arch/amd64/os/linux [EnvInject] - Executing scripts and injecting environment variables after the SCM step. [EnvInject] - Injecting as environment variables the properties content CMAKE_HOME=${CBE_TOOLS}/cmake MAVEN_BIN=${Maven_2.2.1}/bin [EnvInject] - Variables injected successfully. [EnvInject] - Unset unresolved 'MAVEN_BIN' variable.