我正在使用 Cruise Control .Net 1.4 进行持续集成,并将其安装在我的 Windows 2000 桌面上。我有用于构建的 Nant 0.85。我的源代码控制在 Borland Starteam 2005 中。我安装了用于创建 VB.Net Windows 应用程序的 .Net 2003 框架。我已经安装了 CCNet,我认为我的 CCnet.config 文件配置正确。
我面临的问题是,每当我更改任何代码并签入 Starteam 时,CCNet 服务器都不会检测到修改,因此我无法根据修改触发我的构建。为此,我必须依靠 forcebuild。但是对于我的项目来说,每 1 分钟使用一次 forcebuild 是不可接受的。我希望触发器基于修改。即,一旦在 Starteam 上检测到更改,就会自动进行构建。
我的 CCNet.config 文件是这样的:
<workingDirectory>C:\Documents and Settings\uj0011637\Desktop\StarteamCruiseControl\CCNet17Nov08</workingDirectory>
<webURL>http://172.24.120.37/ccnet</webURL>
<triggers>
<intervalTrigger name="continuous" seconds="120" buildCondition="ForceBuild" initialSeconds="120"/>
</triggers>
<sourcecontrol type="starteam">
<executable>C:\Program Files\Borland\StarTeam Cross-Platform Client 2005 R2\stcmd.exe</executable>
<project>DEL_CA_ROBOTS\Tools\CCNet17Nov08</project>
<username>600513221</username>
<password>car0b0ts</password>
<host>oscar.nat.bt.com</host>
<port>51234</port>
<autoGetSource>true</autoGetSource>
<timeout units="minutes">10</timeout>
</sourcecontrol>
<tasks>
<!-- Configure NAnt to compile the updated files -->c:\
<nant>
<executable>C:\Documents and Settings\uj0011637\Desktop\Cruise Control\nant\nant-0.85\bin\NAnt.exe</executable>
<baseDirectory>C:\Documents and Settings\uj0011637\Desktop\StarteamCruiseControl\CCNet17Nov08</baseDirectory>
<nologo>false</nologo>
<buildFile>CCNet17Nov08.build</buildFile>
<logger>NAnt.Core.XmlLogger</logger>
<buildTimeoutSeconds>1200</buildTimeoutSeconds>
</nant>
</tasks>
<!--Publishers will be done after the build has completed-->
<publishers>
<xmllogger>
<logDir>C:\Documents and Settings\uj0011637\Desktop\StarteamCruiseControl\Log</logDir>
</xmllogger>
</publishers>
<modificationDelaySeconds>10</modificationDelaySeconds>
我的构建文件是这样的:
<target name="clean" description="Delete all previously compiled binaries.">
<delete>
<fileset>
<include name="**/bin/${project::get-name()}.dll" />
<include name="**/obj/**" />
<include name="**/*.user" />
</fileset>
</delete>
</target>
<target name="rebuild" dependsontarget="clean, build ">
<zip zipfile="${project::get-name()}.zip" verbose="true">
<fileset>
<include name="**/bin/*.dll" />
<include name="**/bin/*.exe" />
</fileset>
<fileset>
<include name="*.aspx" />
<include name="*.css" />
<include name="*.config" />
<include name="*.js" />
<include name="*.asax" />
<include name="**.txt" />
<include name="**.vb" />
<include name="**.vbproj" />
<include name="**.user" />
<include name="**.sln" />
<include name="**.suo" />
<include name="**.resx" />
</fileset>
<fileset prefix="SQL">
<include name="*.sql" />
</fileset>
</zip>
</target>
<target name="unit_test" description="Run unit tests.">
<exec program="${nunit.dir}\nunit-console.exe" commandline="bin/${prjname}.exe /xml=${prjname}.xml /nologo" />
</target>
<target name="build.Console">
<solution configuration="release" solutionfile="CCNet17Nov08.sln">
</solution>
<property name="expected.output" value="bin/${prjname}.exe"/>
<fail unless="${file::exists(expected.output)}">Output file doesn't exist in ${expected.output}</fail>
</target>
有人可以指导我吗?