- Hudson
- HUDSON-4701
User Hudson Global environment variables not set with m2-extra-steps for Shell extra step
- Log In
-
Views
- XML
- Word
- Printable
Details
-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: m2-extra-steps
-
Labels:None
-
Environment:Platform: All, OS: All
Description
I have a specific Global environment variables set in Hudson/Manage
Hudson/Configure System/Global Properties, called TEST.
When I use a 'Free style' Hudson job with a Shell script, I can use ${TEST} in my
shell command.
When it is defined in a m2 extra step, Shell script does not see the TEST variable
(I did a set command on both case), whereas for ANT m2 extra step, ANT script see
it.
Issue Links
- is duplicated by
-
HUDSON-4851 Taking into account global properties
Activity
-
All
Comments
History
Activity
Hello,
Can confirm this with Hudson 1.332. If you set a property in Manage Hudson >
Configure system > Global properties > Environment variables, its value is not
accessible to either master or slaves, when trying to:
a) pass it to a Maven build (invoke top level Maven goals) - tried all sorts of
syntaxes: $Variable, ${Variable}, ...
b) pass it to an Ant build (invoke Ant targets) - same
This is a major nuisance.
Code changed in hudson
User: : abayer
Path:
trunk/hudson/plugins/m2-extra-steps/src/main/java/hudson/plugins/m2extrasteps/M2ExtraStepsAction.java
trunk/hudson/plugins/m2-extra-steps/src/main/java/hudson/plugins/m2extrasteps/M2ExtraStepsWrapper.java
fisheye4.cenqua.com/changelog/hudson/?cs=24779
Log:
[FIXED HUDSON-4701] Forcing through population of node properties as environment variables through an EnvironmentContributingAction
I have the same issue on 1.384.
when I define a global property (name=TEST and value=MYVALUE) in "Hudson/Manage
Hudson/Configure System/Global Properties" and I use it in the ant properties box like test=${TEST} then I have this output :
[echo] test=${TEST}
Actually it seems it's for every steps, even ANT/Groovy steps.