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

Environment variable resolves variables recursively

      The function hudson.Util.replaceMacro(String, ...) resolves recursively properties, such as:
      PATH=path1:$PATH
      into
      PATH=path1:path1:path1:path1:path1:path1:path1:path1:path1:path1:path1:path1:path1:path1:path1: etc.

      I encountered it when setting variables for slave and running multijob with envinject - the variables were calculated and passed to the child jobs and resulted in running out of memory. More precisely with this variable:
      LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH

      I would expect Jenkins to resolve the R-value and push it in L-value, not to resolve it over and over again.

      Note: I didn't set the variable like this, I suppose it was meant to take $LD_LIBRARY_PATH from Linux server settings and append $ORACLE_HOME/lib

      Note2: Version 1.580.3 ran with those variables fine.

          [JENKINS-33239] Environment variable resolves variables recursively

          Martin Kulich created issue -
          Daniel Beck made changes -
          Labels Original: envinject environment-variables multijob slave New: envinject environment-variables multijob regression slave
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 169125 ] New: JNJira + In-Review [ 183370 ]
          Oleg Nenashev made changes -
          Labels Original: envinject environment-variables multijob regression slave New: environment-variables newbie-friendly regression
          Arnaud TAMAILLON made changes -
          Link New: This issue is related to JENKINS-46120 [ JENKINS-46120 ]
          Iot Home made changes -
          Environment Original: Jenkins 1.642.1 New: Jenkins 1.642.1, Jenkins 2.60.1

            Unassigned Unassigned
            trainmaster Martin Kulich
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: