我在使用 CruiseControl.NET 1.8.5 版本在 git 中获取子模块时遇到问题。我刚刚更新到 msysgit 64bit v2.5.0 并更改了配置以使用新版本。

ThoughtWorks.CruiseControl.Core.CruiseControlException: Source control operation failed: C:\Program Files\Git\mingw64/libexec/git-core\git-submodule: line 535: 0: Bad file descriptor
. Process command: C:\Program Files\Git\bin\git.exe submodule foreach --recursive "git clean -d -f -x"
  bei ThoughtWorks.CruiseControl.Core.Sourcecontrol.ProcessSourceControl.Execute(ProcessInfo processInfo)
  bei ThoughtWorks.CruiseControl.Core.Sourcecontrol.Git.GitClean(IIntegrationResult result)
  bei ThoughtWorks.CruiseControl.Core.IntegrationRunner.Build(IIntegrationResult result)
  bei ThoughtWorks.CruiseControl.Core.IntegrationRunner.Integrate(IntegrationRequest request)

如果我将项目配置更改为
<sourcecontrol type="git">
  <repository>$(tfsServerPath)/softwarename</repository>
  <branch>$(dev)</branch>
  <autoGetSource>true</autoGetSource>
  <fetchSubmodules>false</fetchSubmodules>
  ...
</sourceControl>

它当然适用于没有子模块的项目。这里可能出现什么问题?

亲切的问候

最佳答案

这是一个解决方法:

<sourcecontrol type="multi">
  <sourceControls>
    <git>
      <workingDirectory>src_dir</workingDirectory>
    </git>
  </sourceControls>
</sourcecontrol>

<tasks>
  <exec>
    <executable>git</executable>
    <buildArgs>submodule init</buildArgs>
    <baseDirectory>src_dir</baseDirectory>
  </exec>
  <exec>
    <executable>git</executable>
    <buildArgs>submodule update</buildArgs>
    <baseDirectory>src_dir</baseDirectory>
  </exec>
</tasks>

关于git - CruiseControl.NET 卡在带有 TFS 的 git-submodule 坏文件描述符上,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/32140212/

10-09 08:48