首页 文章

詹金斯无法跑弧

提问于
浏览
1

以下是我当前设置的简要说明 . 我们用

Git:修订控制系统Phabricator:代码审查Jenkins:用于持续集成和运行构建 . 插件:Phabricator差分,windows奴隶插件

Jenkins安装程序有一个linux master,以及windows和Mac Slaves . 我还在项目上启用了Phabricator Differential,并在所有Jenkins节点上安装了arcanist .

在运行Windows项目时,构建失败,并显示以下错误消息,指出它无法在指定的文件夹中找到 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)

1 回答

  • 0

    如Anders所述,日志表示 Cannot run program "sh" . 当您在框中运行 arc 时,您是从Windows命令提示符运行它还是打开类似Linux的shell .

    例如,当我需要在Windows上运行 arc 命令时,我登录时通常会启动Git Bash,它的版本为sh . 但是,为了让这台机器成为一个带有arc的构建服务器,我需要安装Cygwin并让Jenkins在那里运行脚本 .

    我希望这有帮助 .

相关问题