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

Appending to non-existent environment variable, causes it to grow without bounds

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • envinject-plugin
    • None
    • Linux
      Plugin:1.92.2,
      Jenkins: 1.612

      In the Build Environment section, I'm using envinject to set a couple variables via "Properties Content". One entry is:

      LD_LIBRARY_PATH=${WORKSPACE}/ref/dist/lib:$LD_LIBRARY_PATH
      

      Where I run into trouble is if a slave's environment doesn't already have LD_LIBRARY_PATH set. In these cases, what ends up happening is LD_LIBRARY_PATH gets set to a repeating sequence of:

      <worksdpace>/ref/dist/lib:<workspace>/ref/dist/lib:...:<workspace>/ref/dist/lib:$LD_LIBRARY_PATH
      

      Where the value I'm prepending is present dozens of times followed by a non-expanded "$LD_LIBRARY_PATH".

      What I would expect is that the following would be injected into the environment: "<workspace>/ref/dist/lib:"

          [JENKINS-28328] Appending to non-existent environment variable, causes it to grow without bounds

          Josh Davidson created issue -
          Josh Davidson made changes -
          Description Original: In the Build Environment section, I'm using envinject to set a couple variables via "Properties Content". One entry is;
          LD_LIBRARY_PATH=${WORKSPACE}/ref/dist/lib:$LD_LIBRARY_PATH

          Where I run into trouble is if a slave's environment doesn't already have LD_LIBRARY_PATH set. In these cases, what ends up happening is LD_LIBRARY_PATH gets set to a repeating sequence of: <worksdpace>/ref/dist/lib:<workspace>/ref/dist/lib:...:<workspace>/ref/dist/lib:$LD_LIBRARY_PATH

          Where the value I'm prepending is present dozens of times followed by a non-expanded "$LD_LIBRARY_PATH".

          What I would expect is that the following would be injected into the environment: "<workspace>/ref/dist/lib:"
          New: In the Build Environment section, I'm using envinject to set a couple variables via "Properties Content". One entry is:

          {code:}
          LD_LIBRARY_PATH=${WORKSPACE}/ref/dist/lib:$LD_LIBRARY_PATH
          {code}

          Where I run into trouble is if a slave's environment doesn't already have LD_LIBRARY_PATH set. In these cases, what ends up happening is LD_LIBRARY_PATH gets set to a repeating sequence of: <worksdpace>/ref/dist/lib:<workspace>/ref/dist/lib:...:<workspace>/ref/dist/lib:$LD_LIBRARY_PATH

          Where the value I'm prepending is present dozens of times followed by a non-expanded "$LD_LIBRARY_PATH".

          What I would expect is that the following would be injected into the environment: "<workspace>/ref/dist/lib:"
          Josh Davidson made changes -
          Description Original: In the Build Environment section, I'm using envinject to set a couple variables via "Properties Content". One entry is:

          {code:}
          LD_LIBRARY_PATH=${WORKSPACE}/ref/dist/lib:$LD_LIBRARY_PATH
          {code}

          Where I run into trouble is if a slave's environment doesn't already have LD_LIBRARY_PATH set. In these cases, what ends up happening is LD_LIBRARY_PATH gets set to a repeating sequence of: <worksdpace>/ref/dist/lib:<workspace>/ref/dist/lib:...:<workspace>/ref/dist/lib:$LD_LIBRARY_PATH

          Where the value I'm prepending is present dozens of times followed by a non-expanded "$LD_LIBRARY_PATH".

          What I would expect is that the following would be injected into the environment: "<workspace>/ref/dist/lib:"
          New: In the Build Environment section, I'm using envinject to set a couple variables via "Properties Content". One entry is:

          {code:}
          LD_LIBRARY_PATH=${WORKSPACE}/ref/dist/lib:$LD_LIBRARY_PATH
          {code}

          Where I run into trouble is if a slave's environment doesn't already have LD_LIBRARY_PATH set. In these cases, what ends up happening is LD_LIBRARY_PATH gets set to a repeating sequence of:

          {code:}
          <worksdpace>/ref/dist/lib:<workspace>/ref/dist/lib:...:<workspace>/ref/dist/lib:$LD_LIBRARY_PATH
          {code}

          Where the value I'm prepending is present dozens of times followed by a non-expanded "$LD_LIBRARY_PATH".

          What I would expect is that the following would be injected into the environment: "<workspace>/ref/dist/lib:"
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 163164 ] New: JNJira + In-Review [ 181118 ]

            gbois Gregory Boissinot
            mears Josh Davidson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: