Node Label Parameter plugin breaks Windows batch file build steps if Name field not filled in

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • 1.7.3

      When using the Node Label Parameter plugin it breaks any build steps that run Windows batch files if you don't fill in a value for the Name field.

      To reproduce, create a new free style job and select the "This build is parameterized" option. Select a default slave that is a windows machine. Leave the Name field empty.

      Add a build step to run a Windows batch file and fill in a simple command like echo %PATH% or ver. When you run the job the build step will fail with an error message like this:

      Building remotely on WINDOWS_SERVER in workspace C:\jenkins\workspace\update-scripts-all-slaves
      [update-scripts-all-slaves] $ cmd /c call C:\Users\JENKIN~1.SIM\AppData\Local\Temp\hudson7760734931475434766.bat
      The parameter is incorrect
      FATAL: command execution failed
      java.io.IOException: Cannot run program "cmd" (in directory "C:\jenkins\workspace\update-scripts-all-slaves"): CreateProcess error=87, The parameter is incorrect
      at java.lang.ProcessBuilder.start(Unknown Source)
      at hudson.Proc$LocalProc.<init>(Proc.java:244)
      at hudson.Proc$LocalProc.<init>(Proc.java:216)
      at hudson.Launcher$LocalLauncher.launch(Launcher.java:709)
      at hudson.Launcher$ProcStarter.start(Launcher.java:338)
      at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:934)
      at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:901)
      at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:326)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at hudson.remoting.Engine$1$1.run(Engine.java:60)
      at java.lang.Thread.run(Unknown Source)
      Caused by: java.io.IOException: CreateProcess error=87, The parameter is incorrect
      at java.lang.ProcessImpl.create(Native Method)
      at java.lang.ProcessImpl.<init>(Unknown Source)
      at java.lang.ProcessImpl.start(Unknown Source)
      ... 17 more
      Build step 'Execute Windows batch command' marked build as failure

      This only happens if you leave the Name field empty as I originally did. It also only affects Windows batch files, linux shell command build steps work as expected even with an empty Name field.

            Assignee:
            Dominik Bartholdi
            Reporter:
            Glenn Coombs
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: