<?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>Software Configuration Management and Agile Software Development &#187; CI tools</title>
	<atom:link href="http://accurev.com/blog/tag/ci-tools/feed/" rel="self" type="application/rss+xml" />
	<link>http://accurev.com/blog</link>
	<description>SCM and Agile Software Development Blog</description>
	<lastBuildDate>Fri, 03 Feb 2012 19:28:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Pattern for Continuous Builds</title>
		<link>http://accurev.com/blog/2008/03/05/pattern-for-continuous-builds/</link>
		<comments>http://accurev.com/blog/2008/03/05/pattern-for-continuous-builds/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 20:00:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Patterns]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[AccuRev]]></category>
		<category><![CDATA[CI tools]]></category>
		<category><![CDATA[configuration management]]></category>
		<category><![CDATA[continous build best practice]]></category>
		<category><![CDATA[continuous builds]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[continuous integration tools]]></category>
		<category><![CDATA[customer acceptance testing]]></category>
		<category><![CDATA[long build cycles]]></category>
		<category><![CDATA[long test cycles]]></category>
		<category><![CDATA[multistage continuous integration]]></category>
		<category><![CDATA[reparent]]></category>
		<category><![CDATA[reparenting]]></category>
		<category><![CDATA[SCM]]></category>
		<category><![CDATA[snapshots]]></category>
		<category><![CDATA[Software Configuration Management]]></category>
		<category><![CDATA[source code control]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://accurev.wordpress.com/?p=131</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://accurev.com/blog/2008/03/05/pattern-for-continuous-builds/' addthis:title='Pattern for Continuous Builds ' ><a href="//addthis.com/bookmark.php?v=250&#38;username=xa-4d2b47597ad291fb" class="addthis_button_compact">Share</a><span class="addthis_separator">&#124;</span><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a></div>Continuous integration (CI) is all the rage these days because merging, building, and testing (shared) configurations early-and-often is a good thing. Actually, it&#8217;s a great thing! After all, finding problems sooner rather than later benefits everyone. For some, CI means simply testing compilation. (Phew&#8230; it works. Ship it! haha). For those investing time in a [...]<div class="addthis_toolbox addthis_default_style " addthis:url='http://accurev.com/blog/2008/03/05/pattern-for-continuous-builds/' addthis:title='Pattern for Continuous Builds '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://accurev.com/blog/2008/03/05/pattern-for-continuous-builds/' addthis:title='Pattern for Continuous Builds ' ><a href="//addthis.com/bookmark.php?v=250&amp;username=xa-4d2b47597ad291fb" class="addthis_button_compact">Share</a><span class="addthis_separator">|</span><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a></div><p><a title="Continuous Integration" href="http://en.wikipedia.org/wiki/Continuous_integration" target="_blank">Continuous integration</a> (CI) is all the rage these days because merging, building, and testing (shared) configurations early-and-often is a good thing. Actually, it&#8217;s a great thing! After all, finding problems sooner rather than later benefits everyone. For some, CI means simply testing compilation. (Phew&#8230; it works. Ship it! haha). For those investing time in a full test harness, CI may mean frequently executing a suite of tests at various levels (unit, functional, system) to validate functionality and identify regressions. I&#8217;ve even seen other levels of CI to include lab testing, flight testing, or even customer acceptance testing for even the smallest of changes. Regardless of how <em>you</em> &#8216;do&#8217; CI, I&#8217;ll show how I use AccuRev for continuous integration.<em> [Keep in mind that this is one interpretation of the subject matter]</em></p>
<p><strong>The Pattern.</strong> The stream-based nature of AccuRev makes it very natural to define separate areas for development, integration, testing, and release. <a title="Managing CI Builds with AccuRev" href="http://www.accurev.com/blog/wp-content/uploads/2008/03/managing_ci_builds.png" target="_blank"><img style="border:0 solid black;float:right;margin:10px 0 10px 10px" src="http://www.accurev.com/blog/wp-content/uploads/2008/03/managing_ci_builds.png" alt="Managing CI Builds with AccuRev" width="240" height="240" title="Pattern for Continuous Builds" /></a>As seen in my example stream structure, I have an <em>Integration</em> stream as the first point of merging between individual project streams. This <em>Integration</em> stream is a great place to hook up a CI tool [<a title="CruiseControl + AccuRev" href="http://cruisecontrol.sourceforge.net/main/configxml.html#accurev" target="_blank">Cruise Control</a>, <a title="CC.NET + AccuRev" href="http://confluence.public.thoughtworks.org/display/CCNET/Using+CruiseControl.NET+with+AccuRev" target="_blank">CC.NET,</a> <a title="FinalBuilder + AccuRev" href="http://www.finalbuilder.com/Products/FinalBuilder/FeatureMatrix/FeaturesVersionControlSystemActions/tabid/101/Default.aspx" target="_blank">FinalBuilder</a>, QuickBuild and perform nightly or per-promote builds. I prefer to create a snapshot <em>before</em> doing the build mainly because snapshot creation is atomic and their immutable configurations guarantee reproducibility.<em> </em>After creating the snapshot, I will pull the build from the snapshot name. You <em>could </em>build from the <em>Integration</em> stream directly (similar to the concept of a moving label), but creating snapshots makes it easy to visually identify with the build process and compare good builds from bad builds with simple stream diffs.  [<em>Note: integrating any of the above mentioned CI tools is as simple as telling the build tool to pull code from a stream (by name) and then configure the build tool to execute at some frequency and notify people of the build status]</em></p>
<p><strong>What about all those snapshots?</strong> At first, you may think, &#8220;Isn&#8217;t this going to create a gazillion snapshots? Won&#8217;t that take up a ton of (disk) space and totally clutter the stream browser view?&#8221; Well&#8230; No.</p>
<ul>
<li><strong><span style="color:#000080">Snapshots are cheap.</span></strong> Snapshots are extremely cheap server-side entities consuming ~100bytes regardless of the number of elements they label&#8230; so go nuts! <strong><span style="color:#ff6600">Snapshots mark transaction numbers, not elements! </span></strong>I say, always do what you need to solve important problems and answer tough questions even if that means creating a gazillion snapshots; just be sure to organize them.</li>
<li><span style="color:#000080"><strong>Clean up as you go.</strong></span> Your CI build script (build.xml, Makefile, or doBuild.sh) can easily be instructed to remove a snapshot for every snapshot created. I&#8217;d recommend keeping around enough snapshots (say 3 to 10) to do valuable work such as comparing builds or serving as temporary baselines for developers who want to <a href="http://blog.accurev.com/2007/09/21/reparenting-workspaces-whats-the-hype/" target="_blank">reparent.</a> As you can see in the stream structure, AccuRev stores both active and inactive snapshots and it is easy to reactivate any snapshot if necessary (<em>I&#8217;ve enabled the stream browser to show both; lower left corner option</em>).</li>
<li><span style="color:#000080"><strong>Group snapshots.</strong></span> I prefer to tuck logically related sets of snapshots behind a locked pass-through stream. The pass-through stream lets me collapse them all as a group and the lock prevents the pass-through stream from being accidentally being reparented.</li>
</ul>
<p><strong>Tip for very-long build/test cycles.</strong> Over the past few years I&#8217;ve encountered a few shops with single build/test cycles ranging from hours to days to complete. In this case, the concept of CI is slightly challenging because the notion of frequent builds is constrained. In this case, I&#8217;d recommend setting up two distinct test phases; quick and full. The &#8220;quick phase&#8221; is a quick pass sanity test only performing tasks such as compilation and unit testing &#8212; enough to let developers know they can continue on forward progress with little concern. The &#8220;full phase&#8221; is the full blown cycle, taking hours/days to complete, that completes all levels of testing such as compilation, unit testing, functional testing, system testing, etc. I would execute the quick phase early and often while the full phase may be once per week. As an additional step, I would mark the snapshot used for the full phase with a <a href="http://blog.accurev.com/2007/09/20/stream-refactoring-with-pass-throughs/" target="_blank">pass-through stream</a> for the purpose of reporting configuration diffs or letting developers reparent their project streams/workspaces on the latest known good &#8220;certified&#8221; build.</p>
<p>Interested in continuous integration? Perhaps you&#8217;d also be interested in <a href="http://damonpoole.blogspot.com/2008/01/advanced-multi-stage-continous.html" target="_blank">multistage continuous integration</a>&#8230;</p>
<p>/happy building/ &#8211; dave</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://accurev.com/blog/2008/03/05/pattern-for-continuous-builds/' addthis:title='Pattern for Continuous Builds '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://accurev.com/blog/2008/03/05/pattern-for-continuous-builds/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

