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

Linux Master and Windows Slave ends up with unusable PATH

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • None
    • Jenkins master (2.35) running on Centos 7.2 with latest plugins as of today
      Jenkins slave running on Windows Server 2016 as a service started via JNLP

      When having a pipeline task started on a Linux Master and scheduled to a Windows Slave the PATH is not set correctly but other variables seem to be. Here is a sample:

      node('linux'){
          echo "${env.PATH}"
          echo "${env.JAVA_HOME}"
          echo "${env.PATHEXT}"
      }
      node('windows'){
          echo "${env.PATH}"
          echo "${env.JAVA_HOME}"
          echo "${env.PATHEXT}"
      }
      

      Output:

      Started by user FirstName LastName
      [Pipeline] node
      Running on linux.example.local in /var/lib/jenkins/workspace/jenkins-bug
      [Pipeline] {
      [Pipeline] echo
      /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
      [Pipeline] echo
      null
      [Pipeline] echo
      null
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] node
      Running on windows.example.local in c:\Users\jenkins\workdir\workspace\jenkins-bug
      [Pipeline] {
      [Pipeline] echo
      /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
      [Pipeline] echo
      "C:\Program Files\Java\jdk1.8.0_112"
      [Pipeline] echo
      .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      Finished: SUCCESS
      

      Possibly related to:
      https://issues.jenkins-ci.org/browse/JENKINS-23545
      https://issues.jenkins-ci.org/browse/JENKINS-37800
      https://issues.jenkins-ci.org/browse/JENKINS-32000
      https://issues.jenkins-ci.org/browse/JENKINS-40726

            Unassigned Unassigned
            rbjorklin Robin Björklin
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: