Thursday, May 17, 2012

Cruise Control

What is Curise Control
  • Free and open source build scheduler
  • Consists of two components:
    • Build loop (runs as a service/daemon)
    • Status Dashboard (runs as web application)
  • Works with many version control systems (CVS, PVCS, Subversion, ClearCase, ...)
  • Works with any build tool that produces parseable output (Ant, Maven, ...)
  • Cross platform (written in Java)
  • Easily extensible:
    • Configuration easily extended by custom plugins
    • Well defined interfaces for version control systems, build tools and publishers
  • Well supported:
    • Complete reference documentation
    • Active users mailing list
    • Numerous tutorials
    • "Pragmatic Project Automation" book by Mike Clark

    How CC works:
    • Developer checks work into version control
    • CC polls version control
    • If CC detects any changes, it...
      • triggers a build
      • captures logs and build artifacts
        • Examples: jar, war, javadoc, unit test report, code coverage report, code quality metrics
      • publishes results
        • Examples: send email, send instant message, turn on lava lamp

        (Following is the image of build report by CC)

     Project Page

Install CruiseControl.NET :
Download the latest CruiseControl.NET release from: SourceForge or the latest build from CCNetLive.
You can find release notes here. For this article I used the installer for version 1.4 (CruiseControl.NET-1.4-Setup.exe), downloaded from the CCNetLive website.

Run the setup executable file and, when prompted, you must specify your choices for a couple of actions:
‘Install CC.Net server as windows service’ must be checked so that the setup will install CruiseControl as a Windows service.
In the Services management console the CruiseControl service will be displayed with the name: CruiseControl.NET.
‘Create virtual directory in IIS for Web dashboard’ will create a virtual directory named ccnet in the machine’s IIS web server. If you have an IIS server installation supporting multiple web sites (this is not the case for Windows XP Professional) and prefer to have a separate web site for the CCNet web dashboard you should uncheck this option. This is my choice. In the next paragraph I will show you how to create an IIS web site for the CruiseControl.NET web dashboard.

When the install process is finished all the content will be installed in the folder:
C:\%ProgramFiles%\CruiseControl.NET (e.g. C:\Program Files\CruiseControl.NET).
Under this path you will find a directory called server, containing all the CCNet binary files and executables, and a directory called webdashboard, containing the CruiseControl.NET web interface.


Create a CCNet Website in IIS
 Here I will add and configure a Website in IIS for the CruiseControl.NET Webdashboard: the administrative interface of CruiseControl.NET.
Open IIS Manager in Administrative Tools, right-click on the Web Sites node and select New Web Site.
The Web site creation wizard will start.
Click Next and you will be prompted for a Web Site Description.
Type CCNet and click Next, leave Unassigned the IPAddress, choose a port number (say: 222) and leave empty the ‘Host Header for this site’ field, then click Next.
Choose C:\%ProgramFiles%\CruiseControl.NET\webdashboard as the path for the Website and click Next.
Allow ‘Read’ and ‘Run scripts’, the default, and click Next. The wizard is finished and the new Website created.

No comments: