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

nested node() and dir() steps lead to invalid working directory

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Blocker Blocker
    • None
    • Jenkins 2.361.2, Node and Process 1206.v8a_d5f86e336b

      The following pipeline leads to an invalid working directory /home/xxx/C:\workspace\yyy\node-test\foo when executing the sh step. This is a regression since 1206.v8a_d5f86e336b

      node("WINDOWS_BUILD") {
          cleanWs()
          bat "mkdir foo"
          dir("foo") {
              node("UBUNTU_BUILD")

      {             sh 'echo $PWD'         }

          }
      }

      java.io.IOException: Process working directory '/home/xxx/C:\workspace\workspace\kuc2hi\node-test\foo' doesn't exist!
      at hudson.Proc$LocalProc.<init>(Proc.java:252)
      at hudson.Proc$LocalProc.<init>(Proc.java:223)
      at hudson.Launcher$LocalLauncher.launch(Launcher.java:997)
      at hudson.Launcher$ProcStarter.start(Launcher.java:509)
      at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1398)
      at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1340)
      at hudson.remoting.UserRequest.perform(UserRequest.java:211)
      at hudson.remoting.UserRequest.perform(UserRequest.java:54)
      at hudson.remoting.Request$2.run(Request.java:376)
      at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
      at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:125)
      at java.base/java.lang.Thread.run(Thread.java:829)
      Finished: FAILURE

            Unassigned Unassigned
            ckullabosch Christoph Kulla
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: