Open Source .NET Development [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Open Source .NET Development [Electronic resources] - نسخه متنی

Brian Nantz

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید


CruiseControl.NET


Draco.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:

  • CVS

  • Visual Source Safe

  • Perforce

  • Star Team

  • Subversion

  • PVCS


Installing


Installing 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.

NOTE

This 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.

NOTE

To 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.

Configuring


Configuring 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"
includeDetails="TRUE">
<users>
<user name="BuildGuru" group="buildmaster" address="buildguru@mycompany.com"/>
<user name="JoeDeveloper" group="developers" address="joedeveloper@thoughtworks
.com"/>
</users>
<groups>
<group name="developers" notification="change"/>
<group name="buildmaster" notification="always"/>
</groups>
</email>
<xmllogger>
<logDir>..\..\website\log</logDir>
</xmllogger>
</publishers>
</project>
</cruisecontrol>

NOTE

To 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.

Running


One 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 shows CruiseControl.NET automatically kicking off a build when a CVS check-in occurs.

Figure 7-7. WinCVS and CruiseControl Command-Line Client.

[View full size image]

Figure 7-8 is the resulting email notification from the build, and Listing 7.5 is the XML log on the server.

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]

The final way to monitor the CC.NET server build is the tray icon shown in Figure 7-9 that can be run on any Windows client, which is much cooler than the command-line client Draco.NET uses. This uses the standard balloon to tell you the status of your build in real time. You can also configure it to play an mp3 file to tell you the status of the build. You can manually start a build by right-clicking on the tray icon and telling the build to start. Alternatively, there is a Web service for starting builds or checking status.

Figure 7-9. CruiseControl.NET Tray Icon.

FXCop Integration


CruiseControl.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.


.NET Continuous Integration Quick Comparison Chart


Because all of the systems discussed in this chapter are very similar in design, a decision on which system to use will probably come down to a matter of feature sets. Therefore, this quick comparison chart should ease your decisionmaking.

Draco.NET

CC.NET

Hippo.NET

Output Types

XML

X

X

X

Remoting Application

X

X

X

ASP.NET

X

Mail

X

X

SCM

Support

Source Safe

X

X

X

CVS

X

X

Subversion

X

X

Perforce

X

X

PVCS

X

X

Star Team

X

OS SUPPORT

Windows

X

X

X

Linux

?


    / 275