-
Improvement
-
Resolution: Fixed
-
Trivial
I often receive installer issues in "Custom Tools Plugin", which complain about "Run Command" behavior. Seems that its name and documentation are quite confusing, so I propose to slightly refactor them.
An original issue from James Hancox:
When I try to use the custom tools plugin to install a tool named "VxrAnt", I get the following error message:
Started by user anonymous
[CustomTools] - VxrAnt: Starting installation
[VxrAnt] $ sh -e D:\projects\tools\com.cloudbees.jenkins.plugins.customtools.CustomTool\VxrAnt\hudson7649328509533676101.sh
The system cannot find the file specified
FATAL: Cannot run program "sh" (in directory "D:\projects\tools\com.cloudbees.jenkins.plugins.customtools.CustomTool\VxrAnt"): CreateProcess error=2, The system cannot find the file specified
java.io.IOException: Cannot run program "sh" (in directory "D:\projects\tools\com.cloudbees.jenkins.plugins.customtools.CustomTool\VxrAnt"): CreateProcess error=2, The system cannot find the file specified
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:773)
at hudson.Launcher$ProcStarter.start(Launcher.java:353)
at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:998)
at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:965)
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.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:63)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 16 moreAs my install script does not call sh, I can only assume that this is part of the internal workings of the custom tools plugin which has gone awry.
"Run command" installation step invokes "sh" by default.
This name is quite confusing, but it is defined in Jenkins core..
If you want to run Batch command, you can get such installer in https://wiki.jenkins-ci.org/display/JENKINS/Extra+Tool+Installers+Plugin
Does it solve your issue?