-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Hudson 1.344, Hudson batch task plugin 1.12
Some last Hudson version brought a new "Set environment variables" field in job configuration.
This environment variables not inherited or parsed by shell tasks.
One has to duplicate the needed variables in order to be used in task's script commands.
Although the job's environment variables are passed, I've only tested these: parameter variables, $WORKSPACE, $JAVA_HOME, $CLEARCASE_VIEWNAME, etc. Global Environment variables set in hudson's configuration are also correctly parsed.
I don't know if this an issue with tasks or because the "Set environment variables" field is coming after tasks definition in job's configuration view.
Thanks in advance.
–
UPDATED!
[JENKINS-5580] Environment variables from setenv plugin are not inherited/parsed by batch tasks
Description |
Original:
Hudson build's environment environment variables are not inherited or parsed by shell. One has to duplicate the needed variables in order to be used in task's script commands. I presume none of the job's environment variables are passed, but I've only tested these: parameter variables, $WORKSPACE, $JAVA_HOME, $CLEARCASE_VIEWNAME. Also, build's new 'Set environment variables' field is also not inherited by tasks. As well as Hudson's global environment variables that can be configured in Hudson's Configuration panel. Thanks in advance. |
New:
Some last Hudson version brought a new "Set environment variables" field in job configuration. This environment variables not inherited or parsed by shell tasks. One has to duplicate the needed variables in order to be used in task's script commands. Although the job's environment variables are passed, I've only tested these: parameter variables, $WORKSPACE, $JAVA_HOME, $CLEARCASE_VIEWNAME, etc. Global Environment variables set in hudson's configuration are also correctly parsed. I don't know if this an issue with tasks or because the "Set environment variables" field is coming after tasks definition in job's configuration view. Thanks in advance. -- UPDATED! |
Summary | Original: Environment variables are not inherited/parsed by tasks | New: Environment variables from setenv plugin are not inherited/parsed by batch tasks |
Assignee | Original: Kohsuke Kawaguchi [ kohsuke ] | New: Alan Harder [ mindless ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
I made a task with "env" to print env vars.. I see build vars (WORKSPACE and JAVA_HOME) and global vars (from main /configure page) here. I don't see any problem since batch task 1.11 which includes
JENKINS-5039fix.