Jenkins在从Team Foundation Server获取源代码时出错
在workspace \ custom_workspace中构建 [custom_workspace] $ tf workspaces -format:brief -server:HTTP://:8080 / TFS / ********
java.io.IOException: Cannot run program "tf" (in directory "
<WorkspacePath>\custom_workspace"): CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1042)
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.plugins.tfs.TfTool.execute(TfTool.java:99)
at hudson.plugins.tfs.model.Server.execute(Server.java:120)
at hudson.plugins.tfs.model.Workspaces.getListFromServer(Workspaces.java:38)
at hudson.plugins.tfs.model.Workspaces.populateMapFromServer(Workspaces.java:50)
at hudson.plugins.tfs.model.Workspaces.exists(Workspaces.java:76)
at hudson.plugins.tfs.actions.CheckoutAction.checkout(CheckoutAction.java:36)
at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:176)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1280)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
at hudson.model.Run.execute(Run.java:1744)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
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:288)
at java.lang.ProcessImpl.start(ProcessImpl.java:133)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1023)
... 19 more
Finished: FAILURE
答案 0 :(得分:0)
我有同样的问题。我通过在Jenkins系统配置中的Team foundation服务器中给出绝对路径(C:\ TEE-CLC-12.0.2 \ tf.exe)来修复它。