最近在学习配置CruiseControl.NET这个工具,用于新项目的持续集成CI实践,以下是我使用的CruiseControl.NET配置,供参考。
CruiseControl :简称 CC,持续集成工具,主要提供了基于版本管理工具 ( 如 CVS、VSS、SVN) 感知变化或每天定时的持续集成,并提供持续集成报告、 Email 、 Jabber 等等方式通知相关负责人,其要求是需要进行日构建的项目已编写好全自动的项目编译脚本 ( 可基于 Maven 或 Ant) 。
CruiseControl 目前已发展成为一个家族式系统,包括CruiseControl.java、CruiseControl.net、CruiseControl.rb等适应不同语言环境的实现,其强大的插件和扩展能力也是诸多同类系统无法比拟的。
1.配置项目的集成配置
C:\CCNet\BuildArtifacts\TestProject
http://XXX.XXX.XXX.XXX:XXXX/ccnet/server/local/project/TestProject/ViewProjectReport.aspx
2
2.配置引发集成任务开始的触发器
name="continuous"
seconds="600"
buildCondition="ForceBuild"
initialSeconds="5"/>
3.配置SourceControl系统的
使用Subversion或CVS管理
C:\Program Files\VisualSVN\bin\svn.exe
user
pass
svn://192.168.1.1/TestProject/trunk/
C:\TestProject
使用VSS管理
C:\Program Files\Microsoft Visual Studio\VSS\win32\SS.EXE
$/TestProject
user
pass
\\192.168.1.1\vss
c:\TestProject
2
4.自动集成任务内容配置
使用MSBuild
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
C:\TestProject
TestProject.sln
/v:quiet /noconlog /p:Configuration=Debug
C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MSBuild.dll
60
使用NUnit
C:\Program Files\nunit\nunit-console.exe
C:\TestProject\TestProjectTest\bin\Debug\TestProjectTest.dll
使用MSTest
C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe
C:\TestProject
/testcontainer:TestProjectTest\bin\Debug\TestProjectTest.dll
/runconfig:Local.testsettings
120
5.集成成功后的相关配置
cleanUpValue="50" />
6.邮件通知配置
mailhostUsername="user"
mailhostPassword="12345678"
from="user@domain.com"
includeDetails="true">
Failed
Fixed
Change
我使用的一套完整的CruiseControl.NET配置文件
description="This is a CruiseControl.NET demo project">
C:\CCNet\BuildArtifacts\TestProject
http://XXX.XXX.XXX.XXX:XXXX/ccnet/server/local/project/TestProject/ViewProjectReport.aspx
2
name="continuous"
seconds="600"
buildCondition="ForceBuild"
initialSeconds="5"/>
C:\Program Files\VisualSVN\bin\svn.exe
user
pass
svn://192.168.1.1/TestProject/trunk/
C:\TestProject
C:\Program Files\Microsoft Visual Studio\VSS\win32\SS.EXE
$/TestProject
user
pass
\\192.168.1.1\vss
c:\TestProject
2
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
C:\TestProject
TestProject.sln
/v:quiet /noconlog /p:Configuration=Debug
C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MSBuild.dll
60
C:\Program Files\nunit\nunit-console.exe
C:\TestProject\TestProjectTest\bin\Debug\TestProjectTest.dll
C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe
C:\TestProject
/testcontainer:TestProjectTest\bin\Debug\TestProjectTest.dll
/runconfig:Local.testsettings
120
cleanUpValue="50" />
mailhostUsername="user"
mailhostPassword="12345678"
from="user@domain.com"
includeDetails="true">
Failed
Fixed
Change
参考网址:
http://www.iteye.com/topic/336142
http://hi.baidu.com/yjg021/item/d1e251155c1e60088fbde455
http://wenku.baidu.com/view/d2a3fb36f111f18583d05a19.html
http://www.colorwingcode.com/Article/NETxinshouqu/8859.shtml