spacer
  • 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: spacer Bug
  • Status: spacer Resolved
  • Priority: spacer 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

spacer HUDSON-4851 Taking into account global properties

  • spacer
  • spacer

Activity

Ascending order - Click to sort in descending order
    All Comments History Activity
Hide
Permalink
abrugger added a comment -

Actually it seems it's for every steps, even ANT/Groovy steps.

Show
abrugger added a comment - Actually it seems it's for every steps, even ANT/Groovy steps.
Hide
Permalink
ccaraivan added a comment -

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.

Show
ccaraivan added a comment - 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.
Hide
Permalink
scm_issue_link added a comment -

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

Show
scm_issue_link added a comment - 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
Hide
Permalink
ilot added a comment -

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}

Show
ilot added a comment - 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}

People

  • Assignee:
    abayer
    Reporter:
    abrugger
Vote (2)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: