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

Linux Master and Windows Slave ends up with unusable PATH

    • 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

          [JENKINS-40338] Linux Master and Windows Slave ends up with unusable PATH

          Robin Björklin created issue -
          Hyeonsoo Lee made changes -
          Description Original: 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:
          {code:java}
          node('linux'){
              echo "${env.PATH}"
              echo "${env.JAVA_HOME}"
              echo "${env.PATHEXT}"
          }
          node('windows'){
              echo "${env.PATH}"
              echo "${env.JAVA_HOME}"
              echo "${env.PATHEXT}"
          }
          {code}
          Output:
          {code}
          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
          {code}

          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
          New: 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:
          {code:java}
          node('linux'){
              echo "${env.PATH}"
              echo "${env.JAVA_HOME}"
              echo "${env.PATHEXT}"
          }
          node('windows'){
              echo "${env.PATH}"
              echo "${env.JAVA_HOME}"
              echo "${env.PATHEXT}"
          }
          {code}
          Output:
          {code}
          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
          {code}

          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
          Hyeonsoo Lee made changes -
          Component/s New: durable-task-plugin [ 18622 ]
          Robin Björklin made changes -
          Link New: This issue is related to JENKINS-23545 [ JENKINS-23545 ]
          Robin Björklin made changes -
          Link New: This issue is related to JENKINS-37800 [ JENKINS-37800 ]
          Robin Björklin made changes -
          Link New: This issue is related to JENKINS-32000 [ JENKINS-32000 ]
          Robin Björklin made changes -
          Link New: This issue is related to JENKINS-40726 [ JENKINS-40726 ]
          Robin Björklin made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]

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

              Created:
              Updated:
              Resolved: