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

Environment variables referencing other variables broken

    Details

    • Similar Issues:

      Description

      This seems to have broken fairly recently. I have a global PATH environment variable defined in Jenkins as follows:

      PATH: /path/to/toolchain/bin:$PATH

      Freestyle jobs work with this. An older version of the durable task plugin also worked. After updating to the latest, this pipeline job:

      node('master', {
          echo 'env.PATH=' + env.PATH
          sh('env')
         })
      

      results in this output:

      [Pipeline] node
      Running on master in /var/lib/jenkins/workspace/pipeline bug
      [Pipeline] {
      [Pipeline] echo
      env.PATH=/path/to/toolchain/bin:$PATH
      [Pipeline] sh
      [pipeline bug] Running shell script
      nohup: failed to run command ‘sh’: No such file or directory
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      ERROR: script returned exit code -2
      Finished: FAILURE
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jtatum James Tatum
              • Votes:
                26 Vote for this issue
                Watchers:
                51 Start watching this issue

                Dates

                • Created:
                  Updated: