Jenkins:在win7 slave上 执行脚本出错
上一篇 /
下一篇 2013-10-12 12:04:16
/ 个人分类:jenkins
[demo] $ sh -xe C:\Users\Fxu\AppData\Local\Temp\hudson5212310843292151858.sh
The system cannot find the file specified
FATAL: command execution failedjava.io.IOException: Cannot run program "sh" (in directory "D:\Jenkins\workspace\demo"): CreateProcess error=2, ?????????
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$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:63)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: CreateProcess error=2, ?????????
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 shell' marked build as failure
I solved the problem changing the way jenkins start the job on the slave. I used "Execute shell" and some program are executed. I changed "Execute shell" with "Execute windows batch command" and everything works fine.
收藏
举报
TAG: