Quantcast

[JIRA] (JENKINS-15658) EnvInject Undefines Jenkins Global properties referencing WORKSPACE variable

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15658) EnvInject Undefines Jenkins Global properties referencing WORKSPACE variable

JIRA noreply@jenkins-ci.org
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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15658) EnvInject Undefines Jenkins Global properties referencing WORKSPACE variable

JIRA noreply@jenkins-ci.org

I'm looking at a potential regression between version.
However, WORKSPACE variable is only available for job instance. Therefore, the variable is unknown at global level.

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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15658) EnvInject Undefines Jenkins Global properties referencing WORKSPACE variable

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Change By: Gregory Boissinot (01/Nov/12 8:48 PM)
Status: Open In Progress
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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15658) EnvInject Undefines Jenkins Global properties referencing WORKSPACE variable

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
 
Gregory Boissinot edited a comment on Bug JENKINS-15658

I'm looking at a potential regression between versions.
However, WORKSPACE variable is only available for job instance. Therefore, the variable is unknown at global level.

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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15658) EnvInject Undefines Jenkins Global properties referencing WORKSPACE variable

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

Code changed in jenkins
User: Gregory Boissinot
Path:
src/main/java/org/jenkinsci/plugins/envinject/EnvInjectListener.java
src/main/java/org/jenkinsci/plugins/envinject/service/EnvInjectEnvVars.java
http://jenkins-ci.org/commit/envinject-plugin/b1d9dbeaade4f04d624a76b308843a94b575b9ae
Log:
Fix JENKINS-15658

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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15658) EnvInject Undefines Jenkins Global properties referencing WORKSPACE variable

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

I fixed the solution by the authorisation of having a global TEST WORKSPACE variable and it is resolved at runtime at job level.
Please could you check if it suits you?
Waiting for your review, I'll add a regression test.

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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15658) EnvInject Undefines Jenkins Global properties referencing WORKSPACE variable

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Jim Searle commented on Bug JENKINS-15658

Thanks! Where do I get the new version of the plugin?

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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15658) EnvInject Undefines Jenkins Global properties referencing WORKSPACE variable

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

You can build the plugin from the source here
https://github.com/jenkinsci/envinject-plugin

or you can download the last hpi file from the last commit build here
https://buildhive.cloudbees.com/job/jenkinsci/job/envinject-plugin/ws/target/

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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15658) EnvInject Undefines Jenkins Global properties referencing WORKSPACE variable

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Jim Searle commented on Bug JENKINS-15658

That fixed it. Thanks!

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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15658) EnvInject Undefines Jenkins Global properties referencing WORKSPACE variable

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

Code changed in jenkins
User: Gregory Boissinot
Path:
src/main/java/org/jenkinsci/plugins/envinject/EnvInjectJobProperty.java
src/main/java/org/jenkinsci/plugins/envinject/EnvInjectJobPropertyInfo.java
src/test/java/org/jenkinsci/plugins/envinject/GlobalPropertiesTest.java
http://jenkins-ci.org/commit/envinject-plugin/be86097a4ebf373d4874cc5e89e89fd250bf3a01
Log:
Add a regression test to fix JENKINS-15658

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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15658) EnvInject Undefines Jenkins Global properties referencing WORKSPACE variable

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Gregory Boissinot resolved Bug JENKINS-15658 as Fixed
Change By: Gregory Boissinot (02/Nov/12 9:04 PM)
Status: In Progress Resolved
Resolution: Fixed
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
Loading...