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

Global & node level self-referencing variables should work

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • envinject-plugin
    • None
    • Jenkins 1.472
      EnvInject 1.60

      Global & node level variables do not seem to work like intended.

      Master & node configuration:
      • /configure: PATH set to $PATH:/foo/
      • /computer/not_master/configure: PATH set to $PATH:/bar/
      Job configuration:
      • Default "Prepare an environment for the run" enabled, Properties Content: FOO=BAR
      • Execute shell script: echo $PATH
      Expected output:
      • When run on master: <old path>:/foo/
      • When run on non-master: <old path>:/foo/:/bar/
      Actual output:
      • When run on master: <old path> (no /foo/)
      • When run on non-master: $PATH:/bar/:/bar/:/bar/:/bar/:/bar/:/bar/:/bar/:/bar/:/bar/:/bar/:/bar/:/bar/:/bar/:/bar/:/bar/:/bar/:/bar/ (literally contains the string $PATH)

      Also, the non-master job says: [EnvInject] - Unset unresolved 'PATH' variable. The master job doesn't print this.

          [JENKINS-14347] Global & node level self-referencing variables should work

          Code changed in jenkins
          User: Gregory Boissinot
          Path:
          src/main/java/org/jenkinsci/plugins/envinject/EnvInjectComputerListener.java
          http://jenkins-ci.org/commit/envinject-plugin/224689bc0adc5cd3ab4918704cd5b48324b54064
          Log:
          Fix JENKINS-14347

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gregory Boissinot Path: src/main/java/org/jenkinsci/plugins/envinject/EnvInjectComputerListener.java http://jenkins-ci.org/commit/envinject-plugin/224689bc0adc5cd3ab4918704cd5b48324b54064 Log: Fix JENKINS-14347

            gbois Gregory Boissinot
            jorgenpt Jørgen Tjernø
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: