簡體   English   中英

詹金斯無法繼續前進

[英]Jenkins is unable to run arc

這是我當前設置的簡要說明。 我們用

Git:版本控制系統程序員:代碼審查Jenkins:用於持續集成和運行構建。 插件:Phabricator差異,Windows Slaves插件

Jenkins安裝程序具有linux master和Windows&Mac Slave。 我還在項目上啟用了Phabricator Differential,並在所有Jenkins節點上安裝了arcanist。

運行Windows Projects時,構建失敗並顯示以下錯誤消息,提示它無法在指定的文件夾中找到arc 。但是我能夠手動從該文件夾運行弧,因此我確保正確設置了環境變量。有人遇到過這個問題嗎?

 `The system cannot find the file specified
    FATAL: command execution failed
    java.io.IOException: Cannot run program "sh" (in directory "C:\Users\Jenkins\workspace\windows_project"): CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
        at hudson.Proc$LocalProc.<init>(Proc.java:244)
        at hudson.Proc$LocalProc.<init>(Proc.java:216)
        at hudson.Launcher$LocalLauncher.launch(Launcher.java:816)
        at hudson.Launcher$ProcStarter.start(Launcher.java:382)
        at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1149)
        at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1114)
        at hudson.remoting.UserRequest.perform(UserRequest.java:121)
        at hudson.remoting.UserRequest.perform(UserRequest.java:49)
        at hudson.remoting.Request$2.run(Request.java:325)
        at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at hudson.remoting.Engine$1$1.run(Engine.java:69)
        at java.lang.Thread.run(Thread.java:745)
        at ......remote call to winbuild2(Native Method)
        at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1361)
        at hudson.remoting.UserResponse.retrieve(UserRequest.java:221)
        at hudson.remoting.Channel.call(Channel.java:753)
        at hudson.Launcher$RemoteLauncher.launch(Launcher.java:929)
        at hudson.Launcher$ProcStarter.start(Launcher.java:382)
        at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:97)
        at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)
        at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
        at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
        at hudson.model.Build$BuildExecution.build(Build.java:205)
        at hudson.model.Build$BuildExecution.doRun(Build.java:162)
        at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537)
        at hudson.model.Run.execute(Run.java:1744)
        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
        at hudson.model.ResourceController.execute(ResourceController.java:98)
        at hudson.model.Executor.run(Executor.java:374)
    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>(ProcessImpl.java:386)
        at java.lang.ProcessImpl.start(ProcessImpl.java:137)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
        at hudson.Proc$LocalProc.<init>(Proc.java:244)
        at hudson.Proc$LocalProc.<init>(Proc.java:216)
        at hudson.Launcher$LocalLauncher.launch(Launcher.java:816)
        at hudson.Launcher$ProcStarter.start(Launcher.java:382)
        at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1149)
        at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1114)
        at hudson.remoting.UserRequest.perform(UserRequest.java:121)
        at hudson.remoting.UserRequest.perform(UserRequest.java:49)
        at hudson.remoting.Request$2.run(Request.java:325)`

電弧錯誤消息:

[windows_box_testing] $ arc call-conduit differential.querydiffs
The system cannot find the file specified
FATAL: Cannot run program "arc" (in directory "C:\Users\Jenkins\workspace\windows_box_testing"): CreateProcess error=2, The system cannot find the file specified
java.io.IOException: Cannot run program "arc" (in directory "C:\Users\Jenkins\workspace\windows_box_testing"): CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
    at hudson.Proc$LocalProc.<init>(Proc.java:244)
    at hudson.Proc$LocalProc.<init>(Proc.java:216)
    at hudson.Launcher$LocalLauncher.launch(Launcher.java:816)

如Anders所述,日志指示Cannot run program "sh" 在框上運行arc時,是從Windows命令提示符運行它,還是打開類似linux的外殼。

例如,當我需要在Windows上運行arc命令並登錄時,通常會啟動Git Bash,它確實具有sh版本。 但是,為了使該機器啟動並作為帶有arc的構建服務器運行,我需要安裝Cygwin並讓Jenkins在其中運行腳本。

我希望這有幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM