使用CCNET的多项目

时间:2013-04-09 10:20:09

标签: cruisecontrol.net

我有GIT回购,如下所示,

 \main
       \Module A
       \Module B
       \Shared

当我在模块B上进行更改时,CCNET将从模块A和模块B进行构建, 我不希望CCNET这样做。这将花费很多时间。 我只想在模块B上只修改ccnet。

有人请帮助我: 我在CCNET Config中的1个项目:

enter code here
   <project name="Dashboard 5.0" queue="Dashboard_01" queuePriority="01" category="01">
<artifactDirectory>&pathToArtifactsDirectory;Dashboard 5.0\</artifactDirectory>
&workingDirectory;
<webURL>http://&buildServerAddress;/ccnet/server/&buildServerName;/project/Dashboard 5.0/ViewLatestBuildReport.aspx</webURL>
&modificationDelaySeconds;
<triggers>
  <intervalTrigger seconds='30' buildCondition='IfModificationExists'/>
  <scheduleTrigger time='03:00' buildCondition='ForceBuild' name='Scheduled'/>
  <scheduleTrigger time='11:00' buildCondition='ForceBuild' name='Scheduled'/>
</triggers>
<state type="state" directory="&pathToStatesDirectory;Dashboard 5.0\" />

    <sourcecontrol type="git">
      <repository>&gitAddress;</repository>
      <branch>master</branch>
      <autoGetSource>true</autoGetSource>
      <fetchSubmodules>false</fetchSubmodules>
      <executable>C:\Program Files (x86)\Git\cmd\git.exe</executable>

      <commitBuildModifications>false</commitBuildModifications>
      <commitUntrackedFiles>false</commitUntrackedFiles>
      <timeout>3000000</timeout>
    </sourcecontrol>


<tasks>
  <nant>
    <executable>&pathToNantFile;</executable>
    <baseDirectory>&pathToBuildScriptsDirectory;Dashboard 5.0\</baseDirectory>
    <buildArgs>-D:projects_to_build=dashboard_framework</buildArgs>
    <buildFile>cruise.build</buildFile>
    <targetList>
      <target>automate</target>
    </targetList>
    <buildTimeoutSeconds>3000</buildTimeoutSeconds>
  </nant>

</tasks>
<publishers>
  <merge>
    <files>
      <file>&pathDB5MainCheckoutDirectory;framework\build\test-reports\*Test.dll-results.xml</file>
      <file>&pathDB5MainCheckoutDirectory;framework\build\test-reports\Test*.dll-results.xml</file>
      <file>&pathDB5MainCheckoutDirectory;framework\build\test-reports\simian.xml</file>
    </files>
  </merge>
  <xmllogger />
</publishers>

1 个答案:

答案 0 :(得分:1)

对模块A或模块B的任何检入都将导致项目节点以任一方式启动。您正在寻找的是类似于子文件夹上的subversion update命令,而Git不是这样的。您可以为每个模块创建单独的存储库。构建脚本或Nant任务也必须分开。

在Git中,如果你有几个总是独立检出的目录,那么这些实际上是两个不同的项目,应该存在于两个不同的存储库中。您可以稍后使用Git Submodules

将它们合并在一起