Issue Type: Bug Bug
Affects Versions: current
Assignee: Gregory Boissinot
Components: envinject
Created: 29/Oct/12 11:01 PM
Description:

In my jenkins configuration for "Global properties", I have a property TEST_WORKSPACE defined as ${WORKSPACE}.

Then in my jenkins job I have "prepare an environment for the run" defined to a file which does not set TEST_WORKSPACE or WORKSPACE.

But, when I run the job, TEST_WORKSPACE is not defined in console, I get this:

[EnvInject] - Loading node environment variables.
[EnvInject] - Preparing an environment for the build.
[EnvInject] - Keeping Jenkins system variables.
[EnvInject] - Keeping Jenkins build variables.
[EnvInject] - Adding build parameters as variables.
[EnvInject] - Injecting as environment variables the properties file path '/home/jims/global.prop'
[EnvInject] - Variables injected successfully.
[EnvInject] - Injecting contributions.
Building on master in workspace /projects/BCMQUAL/jenkins_test/jobs/test-envinject/workspace
[workspace] $ /bin/sh -x /tmp/hudson3013573853871224155.sh
+ echo 'WORKSPACE = /projects/BCMQUAL/jenkins_test/jobs/test-envinject/workspace'
WORKSPACE = /projects/BCMQUAL/jenkins_test/jobs/test-envinject/workspace
+ echo 'TEST_WORKSPACE = '
TEST_WORKSPACE =
Notifying upstream projects of job completion
Finished: SUCCESS

If I revert back to envinject 1.36, then it is defined and I see this in the console:

[EnvInject] - Preparing an environment for the job.
[EnvInject] - Keep Jenkins system variables.
[EnvInject] - Keep Jenkins build variables.
[EnvInject] - Injecting as environment variables the properties file path '/home/jims/global.prop'
[EnvInject] - Variables injected successfully.
[EnvInject] - Unset unresolved 'TEST_WORKSPACE' variable.
Building on master in workspace /projects/BCMQUAL/jenkins_test/jobs/test-envinject/workspace
[workspace] $ /bin/sh -x /tmp/hudson3503397345619621354.sh
+ echo 'WORKSPACE = /projects/BCMQUAL/jenkins_test/jobs/test-envinject/workspace'
WORKSPACE = /projects/BCMQUAL/jenkins_test/jobs/test-envinject/workspace
+ echo 'TEST_WORKSPACE = /projects/BCMQUAL/jenkins_test/jobs/test-envinject/workspace'
TEST_WORKSPACE = /projects/BCMQUAL/jenkins_test/jobs/test-envinject/workspace
Notifying upstream projects of job completion
Finished: SUCCESS

Environment: Linux lc-irv-1231 2.6.9-89.0.9.ELsmp #1 SMP Wed Aug 19 08:06:10 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux

Jenkins 1.486
envinject 1.72
Project: Jenkins
Priority: Major Major
Reporter: Jim Searle
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to