CCNet触发构建,但即使我将坏代码签入svn也会成功

时间:2009-06-18 19:20:34

标签: .net svn nant ccnet-config

我已经使用SVN作为我的源代码控制并使用NAnt构建脚本设置了CruiseControl for .NET。当我手动构建visual studio解决方案时,我会收到错误,这是正确的,因为我有一些错误的代码。在我将代码签入svn后,CCNet触发了构建,但结果显示为SUCCESS。请参阅下面的配置和构建文件:

NAnt构建文件:

<project name="MyServiceClient" default="build">
  <target name="init" depends="clean" />
  <target name="clean" />
  <target name="checkout"/>
  <target name="compile"/>
  <!--<target name="deploy"/>
  <target name="test"/>
  <target name="inspect"/>-->
  <target name="build" depends="init, checkout">
    <call target="compile" />
<!--    <call target="inspect" />
    <call target="test" />
    <call target="deploy" />-->
  </target>
</project>

的ccnet.config

<cruisecontrol>

  <project name="MyServiceClient">
<sourcecontrol type="svn">
  <trunkUrl>https://dev-wks28.dev.va.root:8443/svn/test/trunk/MyServiceClient</trunkUrl>
  <executable>C:/Program Files/VisualSVN Server/bin/svn.exe</executable>
  <workingDirectory>C:\test\MyServiceClient</workingDirectory>
  <username>kpedda</username>
  <password>Password1</password>
  <autoGetSource>true</autoGetSource>
</sourcecontrol>
<workingDirectory>C:\test\MyServiceClient</workingDirectory>
<triggers>
  <intervalTrigger seconds="90" buildCondition="IfModificationExists" />
  <scheduleTrigger time="10:00" buildCondition="ForceBuild" />
</triggers>
<tasks>
  <nant>
    <executable>C:/Program Files/NAnt/bin/nant.exe</executable>
    <baseDirectory>C:/Apps</baseDirectory>
    <!--<workingDirectory>C:/test/MyServiceClient</workingDirectory>-->
    <!--<projectFile>MyServiceClient.sln</projectFile>-->
    <buildFile>default.build</buildFile>
    <targetList>
      <target>build</target>
    </targetList>
  </nant>
</tasks>
<publishers>
  <xmllogger/>
</publishers>

有人可以告诉我发生了什么事吗?

1 个答案:

答案 0 :(得分:1)

你的NANT再次粘贴:

<?xml version="1.0"?>
<project name="MyServiceClient" default="build">
    <target name="init" depends="clean" /> <target name="clean" />
    <target name="checkout"/>
    <target name="compile"/>
    <!--<target name="deploy"/> <target name="test"/> <target name="inspect"/>-->
    <target name="build" depends="init, checkout">
         <call target="compile" />
         <!-- <call target="inspect" /> <call target="test" /> <call target="deploy" />-->
    </target>
</project>

此脚本不执行任何操作。 NANT甚至没有用这个脚本查看你的源代码。