Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-4701

User Hudson Global environment variables not set with m2-extra-steps for Shell extra step

    XMLWordPrintable

    Details

    • Similar Issues:

      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.

        Attachments

          Issue Links

            Activity

            Hide
            abrugger abrugger added a comment -

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

            Show
            abrugger abrugger added a comment - Actually it seems it's for every steps, even ANT/Groovy steps.
            Hide
            ccaraivan Costin Caraivan 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 Costin Caraivan 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
            scm_issue_link SCM/JIRA link daemon 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
            http://fisheye4.cenqua.com/changelog/hudson/?cs=24779
            Log:
            [FIXED JENKINS-4701] Forcing through population of node properties as environment variables through an EnvironmentContributingAction

            Show
            scm_issue_link SCM/JIRA link daemon 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 http://fisheye4.cenqua.com/changelog/hudson/?cs=24779 Log: [FIXED JENKINS-4701] Forcing through population of node properties as environment variables through an EnvironmentContributingAction
            Hide
            ilot 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 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 Andrew Bayer
              Reporter:
              abrugger abrugger
              Votes:
              2 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: