Click here to Skip to main content
Licence CPOL
First Posted 6 Dec 2007
Views 28,291
Bookmarked 22 times

How to Setup CruiseControl.NET for Starters

By | 20 Jul 2008 | Article
Shows the bare minimum steps to automate the build process of an ASP.NET Visual Studio 2005 solution

Introduction

As you already know, CruiseControl.Net is an open source framework for build automation. Though there are hundreds of articles on the topic in the web, I was unable to find one that suited me as a starter. Hope this article helps people like me out there who want to get a taste of the continuous integration process using CruiseControl.Net, Visual Source Safe and Visual Studio.

I intend to showcase the bare minimum steps involved to automate the build process of an ASP.NET Visual Studio 2005 solution.

Prerequisites

  • CruiseControl.Net
  • Visual Studio 2005 IDE
  • Visual SourceSafe

Getting Started

Install the setup files for CC.net either using the MSI installer or simply unzip the zip file (I used the later approach). You will find four folders namely, cctray, examples, server and webdashboard. Edit the ccnet.config file in the server to make it look like the following:

<cruisecontrol>
<project name="MyProjectBuild" queue="Q1" queuePriority="1">
    <workingDirectory>c:\TestCC</workingDirectory>
    <artifactDirectory>c:\TestCC\Docs</artifactDirectory>
    <category>Category 1</category>
    <webURL>http://localhost/ccnet</webURL>
    <modificationDelaySeconds>2</modificationDelaySeconds>
    <sourcecontrol type="vss" autoGetSource="true" applyLabel="true">
   	<executable>C:\Program Files\Microsoft Visual Studio\
				Common\VSS\win32\SS.EXE</executable>
   	<project>$/MyProject/Source</project>
   	<username>judy</username>
   	<password></password>
   	<ssdir>\\filesvr1\myproj</ssdir>
   	<workingDirectory>c:\TestCC</workingDirectory>   	
   	<cleanCopy>true</cleanCopy>
    </sourcecontrol>
    <tasks>
        <devenv>
	    <solutionfile>c:\TestCC\src\MySolution.sln</solutionfile>
	    <configuration>Debug</configuration>
	    <buildtype>Build</buildtype>	    
	    <executable>C:\Program Files\Microsoft Visual Studio 8\
				Common7\IDE\devenv.exe</executable>
	    <buildTimeoutSeconds>300</buildTimeoutSeconds>
	</devenv>
    </tasks>
    <publishers>
        <xmllogger logDir="c:\TestCC\buildlogs" />
    </publishers>
</project>
</cruisecontrol>

The above XML shows that I have my VSS db in another machine on the network \\filesvr1\myproj. I want CC.NET to get a clean copy of the source from vss location $/MyProject/Source to my local folder c:\testcc. Instruct VS IDE to build the solution c:\testcc\src\MySolution.sln.

Now I am ready to run the server. All I need to do is issue the following command from the command line:

ccnet -project:MyProjectBuild 

This will immediately integrate the project MyProjectBuild. The verbose output can be seen in the command prompt itself. To get a better view, the web dashboard needs to be configured. This can be done by simply creating a website pointing to the dashboard folder. Navigating to the default page would show the project integration status. Note that the ccnet.exe server has to be running to view the build status.

You can also apply triggers to schedule the build. This can be done quite easily using the <triggers> tag.

Conclusion

You can see how easy it is to get CruiseControl.Net running. This article just describes how to automate the build. The build is still not ready for deployment. Meaning I may want to place the build in another folder for release without the code behind. This is covered in the article, Automating ASP.NET Web Application project build using CruiseControl.Net and MSBuild.

Happy programming!

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Judy Joy

Team Leader

India India

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Layout  Per page   
  Refresh
GeneralCCNet XmlConfig Plugin Pinmembervoid leenux();7:38 16 Apr '11  
GeneralCCNET Pinmemberhemalvadgama3:29 22 Apr '08  
QuestionIntegrating ncoverexplorer into cruisecontrol.net? [modified] Pinmemberppayal21:25 5 Apr '08  
QuestionMissing a tag? PinmemberTodd Davis5:47 5 Apr '08  
AnswerRe: Missing a tag? PinmemberJudy Vinu20:31 24 Jul '08  
Thanks for pointing it out. Have corrected it.
GeneralCruiseControl and Source Safe configuration PinmemberWilliam F22:22 27 Jan '08  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web03 | 2.5.120604.1 | Last Updated 21 Jul 2008
Article Copyright 2007 by Judy Joy
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid