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

Problems expanding variables created outside the Jenkins build

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Some plugins stopped to work when macros are putted to expand. That worked well before. You can see almost identical stacktrace

      https://issues.jenkins-ci.org/browse/JENKINS-37222
      https://github.com/jenkinsci/stashnotifier-plugin/issues/117

        Attachments

          Activity

          Hide
          slide_o_mix Alex Earl added a comment -

          Environment variables are not available outside the step that creates them, e.g. a shell step can't create an environment variable that will stick around after that step.

          Show
          slide_o_mix Alex Earl added a comment - Environment variables are not available outside the step that creates them, e.g. a shell step can't create an environment variable that will stick around after that step.
          Hide
          twlight Shawn Baumkirchner added a comment -

          Right, so you're saying an environment var which is created in post build would not be available in post build? or is it plugin specific?

          Show
          twlight Shawn Baumkirchner added a comment - Right, so you're saying an environment var which is created in post build would not be available in post build? or is it plugin specific?
          Hide
          slide_o_mix Alex Earl added a comment -

          Not available from one post build step to the next. Normally though, anything you create from a normal shell script will not be available outside that specific step (whether build or post-build). This is why EnvInject was created. I am not sure it allows setting environment variables during post-build.

          Show
          slide_o_mix Alex Earl added a comment - Not available from one post build step to the next. Normally though, anything you create from a normal shell script will not be available outside that specific step (whether build or post-build). This is why EnvInject was created. I am not sure it allows setting environment variables during post-build.
          Hide
          twlight Shawn Baumkirchner added a comment -

          I've decided to just leave this alone for now. I don't have any more time to work on it. It seems that trying to export the variable at any step the variables are not found. Thank you so much for your help on this Alex. Please close at your leisure.

          Show
          twlight Shawn Baumkirchner added a comment - I've decided to just leave this alone for now. I don't have any more time to work on it. It seems that trying to export the variable at any step the variables are not found. Thank you so much for your help on this Alex. Please close at your leisure.
          Hide
          slide_o_mix Alex Earl added a comment -

          Sorry it's not working for you. I've been hit by the inability to get environment variables exposed as well.

          Show
          slide_o_mix Alex Earl added a comment - Sorry it's not working for you. I've been hit by the inability to get environment variables exposed as well.

            People

            Assignee:
            slide_o_mix Alex Earl
            Reporter:
            scaytrase Pavel Batanov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: