<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>redstream &#187; CruiseControl</title>
	<atom:link href="http://www.redstream.nl/tag/cruisecontrol/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.redstream.nl</link>
	<description>Pragmatic Integrators</description>
	<lastBuildDate>Fri, 27 Jan 2012 19:31:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using CruiseControl for your Continuous Build</title>
		<link>http://www.redstream.nl/2007/09/22/using-cruisecontrol-for-your-continuous-build/</link>
		<comments>http://www.redstream.nl/2007/09/22/using-cruisecontrol-for-your-continuous-build/#comments</comments>
		<pubDate>Sat, 22 Sep 2007 07:45:20 +0000</pubDate>
		<dc:creator>Pascal Alma</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[Continuous Build]]></category>
		<category><![CDATA[CruiseControl]]></category>
		<category><![CDATA[Red Hat]]></category>

		<guid isPermaLink="false">http://www.pascalalma.net/2007/09/22/using-cruisecontrol-for-your-continuous-build/</guid>
		<description><![CDATA[To increase the quality of our source code in our current project I decided to start to use Continuous Integration. Although it is a wise choice to use this from the start of a project, for some reason it hadn&#8217;t &#8230; <a href="http://www.redstream.nl/2007/09/22/using-cruisecontrol-for-your-continuous-build/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.redstream.nl%2F2007%2F09%2F22%2Fusing-cruisecontrol-for-your-continuous-build%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.redstream.nl%2F2007%2F09%2F22%2Fusing-cruisecontrol-for-your-continuous-build%2F&amp;source=redstreamlive&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>To increase the quality of our source code in our current project I decided to start to use <a href="http://www.martinfowler.com/articles/continuousIntegration.html">Continuous Integration</a>. Although it is a wise choice to use this from the start of a project, for some reason it hadn&#8217;t been set up yet for this project. In this blog I will state the steps it took for us to install, configure and run <a href="http://cruisecontrol.sourceforge.net/">CruiseControl</a> on a Linux (Red Hat) machine. <span id="more-59"></span><br />
CruiseControl is an open-source tool to set up a continuous build process using Ant. One requirement that should be met before starting to use continious integeration, is that there is already a &#8216;test&#8217; target in your Ant building process and that you have written the Unit tests to test all your (main) classes. A continuous integration process that is not testing your code for failures isn&#8217;t of much use, is it? So if that is not the case then you first have to write the unit tests (using Junit or TestNG) and then have Ant these tests performed when building your code.</p>
<p>The steps that have to be taken are:</p>
<ul>
<li> Install CruiseControl at the server</li>
<li> Install a client for your used Version System</li>
<li> Checkout your project in a CruiseControl folder</li>
<li> Setup the config.xml</li>
<li>[optional] Setup the mail server</li>
<li> Start CruiseControl</li>
</ul>
<p>By the way, I am not very experienced with Linux, so if you discover something I could have done handier, please let me know!</p>
<ul>
<li> <strong>Install CruiseControl at the server</strong>
<p>Download the latest version (2.7 nowadays) of the zip file <a href="http://sourceforge.net/project/showfiles.php?group_id=23523&#038;package_id=16338&#038;release_id=513002">here</a>. Place this zip file at your server (for instance) in the folder <em>/opt/</em> and extract it with: <em>sudo unzip cruisecontrol-bin-2.7.zip</em>.
</li>
<li><strong>Install a client for your used Version System</strong><br />
Since CruiseControl needs to check your source code in the repository and check it out if necessary, you will need to have a client installed for your versioning system. We are using SubVersion so I had to install a SubVersion client.<br />
First download the package to install ( make sure you pick one for your Linux distribution). I took the one for &#8216;Red Hat Enterprise Linux ES release 4&#8242; that can be found <a href="http://downloads.open.collab.net/collabnet-subversion.html">here</a>. AFter placing the package at your server you can test the installment of  it with the following command:<br />
<em>sudo rpm -Uhv &#8211;test CollabNetSubversion-client-1.4.4-1.i386.rpm</em><br />
If this doesn&#8217;t show any problem you can perfrom the real installation with the same command but leaving &#8216;&#8211;test&#8217; out:<br />
<em>sudo rpm -Uhv CollabNetSubversion-client-1.4.4-1.i386.rpm</em><br />
Now add the &#8216;svn&#8217; command to the path variable so you can execute it in every directory by editing your profile with:<br />
<em>sudo vi /etc/profile</em> and add the folder &#8216;/opt/CollabNet_Subversion/bin&#8217; to the path variable.
</li>
<li><strong>Checkout your project in a CruiseControl folder</strong><br />
I created a subfolder &#8216;myproject&#8217; in the directory &#8216;$cruisecontrol_home$/projects/&#8217; and copied my sources in there from my windows environment (including the svn folders!). This way your newly installed svn client knows where it can find the SVN server and the necessary paths etc.
</li>
<li> <strong>Setup the config.xml</strong>
<p>This is the most fun part! Of course you will not create your perfect configuration at once but with some trial &#038; error and a lot of info <a href="http://cruisecontrol.sourceforge.net/">here</a> and <a href="http://cruisecontrol.sourceforge.net/main/configxml.html">here</a> you will eventually create the configuration that meets your needs :-)
</li>
<li> <strong>Start CruiseControl</strong>
<p>To start CruiseControl you navigate to the &#8216;$cruisecontrol_home$&#8217; directory and enter the command: <em>sudo ./cruisecontrol.sh</em><br />
To stop CruiseControl I use the command <em>sudo kill xxxxx</em>, so if someone knows a better I way&#8230;</li>
</ul>
<p>After a succesful build cycle you can know browse to the CruiseControl Dashboard, default at &#8216;http://yourserver:8080/, and watch the results.<br />
That&#8217;s it! As I said before this was the first time I installed it on a linux xsystem, so I was pretty proud I got it all working in a rather short amount of time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redstream.nl/2007/09/22/using-cruisecontrol-for-your-continuous-build/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

