CruiseControl.NETDraco.NET was inspired by the Java CruiseControl project created by Thoughtworks (http://www.thoughtworks.com). Recently, Thoughtworks has created a .NET version of CruiseControl. Each of the two systems has its strengths and weaknesses. CruiseControl.NET> (CC.NET) uses NAnt for its build system and NUnit for its Unit testing. CC.NET supports the following version control systems:
InstallingInstalling CruiseControl.NET is a little more challenging than Draco.NET, but is worth it for all the additional functionality! To run the server, you must use the StartCCNet.bat file. If you want CC.NET to run as a service (like Draco.NET), then you have to install the service exe by using the installutil.exe shipped with the .NET SDK Framework.NOTEThis is based on CruiseControl.NET version 0.4-Pre1.You have to create the configuration file (ccnet.config), which is not a .NET configuration file but is very simple to create, and the documentation includes plenty of examples.NOTETo get the ASP.NET build output, you have to configure your Web server to serve up the Web directory from the distribution zip file as documented at http://ccnet.thoughtworks.com/docs/webapp/indexl. ConfiguringConfiguring CC.NET is very intuitive and well documented. Listing 7.4. Configuring CruiseControl.NET<cruisecontrol> <project name="aspell-net"> <webURL>http://buildserver/myproject</webURL> <schedule type="schedule" timeout="60000"/> <modificationDelay>10000</modificationDelay> <sourcecontrol type="cvs"> <executable>c:\temp\cvs.exe</executable> <workingDirectory>c:\fromcvs\myrepo</workingDirectory> <cvsroot>/cvsrepository</cvsroot> </sourcecontrol> <build type="nant"> <executable>c:\temp\nant.exe</executable> <baseDirectory>c:\book\aspell-net</baseDirectory> <buildFile>master.build</buildFile> <targetList> <target>build</target> </targetList> <buildTimeout>300000</buildTimeout> </build> <publishers> <email from="buildmaster@mycompany.com" mailhost="smtp.mycompany.com" ![]() <users> <user name="BuildGuru" group="buildmaster" address="buildguru@mycompany.com"/> <user name="JoeDeveloper" group="developers" address="joedeveloper@thoughtworks ![]() </users> <groups> <group name="developers" notification="change"/> <group name="buildmaster" notification="always"/> </groups> </email> <xmllogger> <logDir>..\..\website\log</logDir> </xmllogger> </publishers> </project> </cruisecontrol> NOTETo create a daily build rather than building with each check-in, change the <schedule> element to <schedule type="daily" integrationTime="19:00" />.The name element once again is very important for specifying a manual build and for build notifications like emails and the Web dashboard. The <webURL> is the path to the virtual directory that hosts the Web dashboard which is described in the installation notes in the online documentation at http://ccnet.thoughtworks.com. The URL link specified by <webUrl> is embedded into the email notification if the recipient wants more detail on the build. Also is the URL used by the cctray client to directly launch Internet Explorer (or your browser of choice) to the Web dashboard. RunningOne of the biggest advantages to CC.NET is the many different ways to monitor the build and capture the output right out of the box. Because of its XML output, Draco.NET can also perform many of these actions, but they would require a little extra work. Figure 7-6 shows the ASP.NET output on the build server. Figure 7-6. CruiseControl.NET ASP.NET Output.[View full size image] ![]() Figure 7-7. WinCVS and CruiseControl Command-Line Client.[View full size image] ![]() Listing 7.5. Cruise Control XML Report<cruisecontrol> <modifications> <modification type="added"> <filename>Readme.txt</filename> <project></project> <date>04 Nov 2003 13:42</date> <user>bnantz</user> <comment>branches: 1.1.1;Initial revision</comment> </modification> ... </modifications> </cruisecontrol> Figure 7-8. CruiseControl.NET Email Notifications.[View full size image] ![]() Figure 7-9. CruiseControl.NET Tray Icon.![]() FXCop IntegrationCruiseControl.NET has a nice optional <fxcop> element in the config file that offers an integrated way to run FxCop on all assemblies if you have not already done so in the NAnt build.
|