Tuesday, February 26, 2008

Setting up CruiseControl.Net with VSS, MSBuild, Nunit, Email etc.

I couldn't find simple step-by-step instructions to setup CruiseControl.Net, so thought I will provide what I followed here.






The practice of continuous integration represents a fundamental shift in the process of building software. It takes integration, commonly an infrequent and painful exercise, and makes it a simple, core part of a developer's daily activities. Integrating continuously makes integration a part of the natural rhythm of coding, an integral part of the test-code-refactor cycle. Continuous integration is about progressing steadily forward by taking small steps.

CruiseControl.NET from Thoughtworks makes continuous integration fully automated. CruiseControl.NET comprises of three components:






  1. The server - CruiseControl.NET Server a tool that automates the integration process by monitoring the team's source control repository directly. Every time a developer commits a new set of modifications, the server will automatically launch an integration build to validate the changes. When the build is complete, the server notifies the developer whether the changes that they committed integrated successfully or not. Effectively, integration becomes as easy as checking in code. Using an automated integration server not only makes integration easy, it also guarantees that an integration build will happen. There is no danger of developers forgetting to validate their changes after checking in.



  2. Web Dashboard - A .NET web application that gives you a status and detailed view of the CruiseControl.NET projects and servers in your organization.



  3. CCTray - A client System Tray application that enables you to see 'at a glance' the state of your projects from any machine on your network.



Installing and Configuring the CruiseControl.NET Server







  1. CruiseControl.Net Server installer (with web dashboard) is available at: http://downloads.sourceforge.net/ccnet/CruiseControl.NET-1.3-Setup.exe?modtime=1182463056&big_mirror=0






  • Install the CruiseControl.NET server on an integration server such as a Development server. The server must have .NET framework 2.0



  • Install the Web Dashboard also on the Development server. The server must have IIS 6.0 (with a website running on port 80) to install the web dashboard.



  • Download the file http://ccnetlive.thoughtworks.com/MSBuildXmlLogger-Builds/ThoughtWorks.CruiseControl.MSBuild.dll and copy the file to the server directory in the CruiseControl.NET installation (usually C:\Program Files\CruiseControl.NET\server)






  1. Ensure that the CruiseControl.Net server Windows service has been started



  2. Locate the ccnet.config file (usually under C:\Program Files\CruiseControl.NET\server).



  3. Modify the ccnet.config file and change the following key settings:






  • Projects to be monitored (such as ClubPlanning, FolderMonitor, TransmitSKU etc.)



  • VSS settings (VSS branches to monitor for check-ins, userid/pwd, location of VSS DB, Working Directory etc.) for the projects.



  • Visual Studio Solutions that should be compiled when check-ins occur for the projects.



  • Email settings for the projects.



A sample is shown below of how a ccnet.config will look like when these are setup.






Installing and Configuring the CruiseControl.Net CCTray Desktop Application



  1. CruiseControl.Net CCTray is available at:
    http://downloads.sourceforge.net/ccnet/CruiseControl.NET-CCTray-1.3-Setup.exe?modtime=1182463076&big_mirror=0

  2. Install the CCTray application on every developer desktop. The desktop must have .NET framework 2.0.

  3. After installation, run CCTray and goto File->Settings

  4. In the Build Projects tab, click Add and in the ensuing screen click Add Server.

  5. In the Build Server screen, select Via the CruiseControl.NET dashboard and type in the URL of the web bashboard (such as http://myserver/ccnet ) and click OK on the Build Server screen.

  6. On the Project screen that follows, select the Available Projects that appear in the right hand side and click OK.

  7. This should now show the projects list and their build status in the CCTray application.

No comments:

Post a Comment