<?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>Magpiebrain &#187; Build And Deployment</title>
	<atom:link href="http://www.magpiebrain.com/category/development/build-and-deployment/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.magpiebrain.com</link>
	<description>The blog of Sam Newman</description>
	<lastBuildDate>Thu, 02 Sep 2010 21:01:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>QCon London</title>
		<link>http://www.magpiebrain.com/2010/02/16/qcon-london/</link>
		<comments>http://www.magpiebrain.com/2010/02/16/qcon-london/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 21:12:20 +0000</pubDate>
		<dc:creator>Sam Newman</dc:creator>
				<category><![CDATA[Build And Deployment]]></category>
		<category><![CDATA[presentations]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[devops]]></category>
		<category><![CDATA[qcon]]></category>
		<category><![CDATA[speaking]]></category>

		<guid isPermaLink="false">http://www.magpiebrain.com/?p=787</guid>
		<description><![CDATA[I&#8217;ve been invited to speak on colleague Chris Read&#8217;s track at QCon London this March. The track itself is chock full of a number of experienced proffesionals (including two ex-colleagues) so I fully intend to raise my game accordingly. We&#8217;re lucky enough to have Michael T. Nygard speaking too, author of perhaps the best book [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.magpiebrain.com/wp-content/uploads/2010/02/Screen-shot-2010-02-16-at-08.07.11.png"><img src="http://www.magpiebrain.com/wp-content/uploads/2010/02/Screen-shot-2010-02-16-at-08.07.11.png" alt="" title="QCon Logo" width="259" height="101" class="alignleft size-full wp-image-786" /></a> I&#8217;ve been invited to speak on colleague <a href="http://blog.chris-read.net/">Chris Read&#8217;s</a> track at <a href="http://qconlondon.com/">QCon London</a> this March. The track itself is chock full of a number of experienced proffesionals (including two ex-colleagues) so I fully intend to raise my game accordingly. We&#8217;re lucky enough to have Michael T. Nygard speaking too, author of perhaps the best book written for software developers in years in the form of <a href="http://www.pragprog.com/titles/mnee/release-it">Release It!</a></p>
<p>The track &#8211; &#8220;<a href="http://qconlondon.com/london-2010/tracks/show_track.jsp?trackOID=331">Dev and Ops &#8211; a Single Team</a>&#8221; &#8211; attempts to address many of the issues software professionals have in getting their software live. It will cover many aspects, both on the hardcore technical and on the softer people side. Hopefully it will provide lots of useful information you can take back to your own teams.</p>
<p>My talk &#8211; <a href="http://qconlondon.com/london-2010/presentation/From+Dev+to+Production%3A+Better+Living+through+Build+Pipelines+and+Teamwork">From Dev To Production</a>- will be giving an overview of build pipelines, and how they can be used to get the whole delivery team focused on the end objective &#8211; shipping quality software as quickly as possible. It draws on some of my recent writing on <a href="http://www.magpiebrain.com/category/development/build-and-deployment/build-and-deployment-patterns/">build patterns</a>, and a wealth of knowledge built up inside ThoughtWorks over the past few years.</p>
<p>My experience of QCon SF last year was excellent &#8211; I can thoroughly recommend it to any IT professional involved in shipping software. If you haven&#8217;t got your ticket already, <a href="https://secure.trifork.com/london-2010/registration/">go get them now</a> before the prices go up!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.magpiebrain.com/2010/02/16/qcon-london/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Build Pattern: Chained Continuous Build</title>
		<link>http://www.magpiebrain.com/2010/01/24/build-pattern-chained-continuous-build/</link>
		<comments>http://www.magpiebrain.com/2010/01/24/build-pattern-chained-continuous-build/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 18:22:36 +0000</pubDate>
		<dc:creator>Sam Newman</dc:creator>
				<category><![CDATA[Build And Deployment Patterns]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[buildpattern]]></category>
		<category><![CDATA[devops]]></category>
		<category><![CDATA[pattern]]></category>

		<guid isPermaLink="false">http://www.magpiebrain.com/?p=744</guid>
		<description><![CDATA[One of the problems quickly encountered when any new team adopts a Continuous Build is that builds become slow. Enforcing a Build Time Limit can help, but ultimately if all of your Continuous Build runs as one big monolithic block, there are limits to what you can do to decrease build times. One of the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.magpiebrain.com/wp-content/uploads/2010/01/pipeline-flickr-Stuck-in-Customs.jpg"><img class="alignleft size-thumbnail wp-image-694" title="The Steam Pipeline" src="http://www.magpiebrain.com/wp-content/uploads/2010/01/pipeline-flickr-Stuck-in-Customs-150x150.jpg" alt="Pipeline from Flickr user Stuck in Customs" width="150" height="150" /></a> One of the problems quickly encountered when any new team adopts a Continuous Build is that builds become slow. Enforcing a <a title="Magpiebrain: Build Pattern: Build Time Limit" href="http://www.magpiebrain.com/2010/01/16/build-pattern-build-time-limit/">Build Time Limit</a> can help, but ultimately if all of your Continuous Build runs as one big monolithic block, there are limits to what you can do to decrease build times.</p>
<p>One of the main issues is that you don&#8217;t get fast feedback to tell you when there is an issue &#8211; by breaking up a monolithic build you can gain fast feedback without reducing code coverage, and often without any complex setup.</p>
<p>In a <strong>Chained Continuous Build</strong>, multiple build stages are chained together in a flow. The goal is for the earlier stages to provide the fastest feedback possible, so that build breakages can be detected early. For example, a simple flow might first compile the software and run the unit tests, with the next stage running the slower end-to-end tests.</p>
<p><a href="http://www.magpiebrain.com/wp-content/uploads/2010/01/Simple.gif"><img class="aligncenter size-full wp-image-748" title="Simple Build Chain" src="http://www.magpiebrain.com/wp-content/uploads/2010/01/Simple.gif" alt="" width="294" height="94" /></a></p>
<p>With the chain, a downstream stage only runs if the previous stage passed &#8211; so in the above example, the end-to-end stage only runs if the build-and-test stage passes. </p>
<h3>Handling Breaks</h3>
<p>As with a Continuous Build you need to have a clear escalation process by which the whole team understands what to do in case of a break. Most teams I have worked with tend to stick to the rule of downing tools to fix the build if any part of the Continuous Build is red &#8211; which is strongly recommended. It is important that if you do decide to split your continuous build into a chain that you don&#8217;t let the team ignore builds that happen further along the chain.</p>
<h3>Build Artifacts Once vs Rebuild</h3>
<p>It is strongly suggested that you build the required artifacts once, and pass them along the chain. Rebuilding artifacts takes time &#8211; and the whole point of a chained build is to improve feedback. Additionally getting into the habit of building an artifact once, and once only, will help when you start considering creating a proper Build Pipeline (see below).</p>
<h3>And Build Pipelines</h3>
<p>Note that a chained build is not necessarily the same thing as a Build Pipeline. A Chained Continuous Build simply represents one or more Continuous Builds in series, whereas a Build Pipeline fully models all the stages a software artifact moves from development right through to production. One or more Chained Continuous Builds may form part of a Build Pipeline, and a simplistic Build Pipeline might not represent anything other than Chained Continuous Builds, but Build Pipelines will often incorporate activities more varied than compilation or test running.</p>
<h3>Fast Feedback vs Fast Total Build Time</h3>
<p>One thing to note is that by breaking a big build up into smaller sections to improve fast feedback, counterintuitively you may well end up increasing overall build time. The time to build and pass artifacts from one stage to another adds time, as does dispatching calls to build processes further down the chain. This balance has to be considered &#8211; consider being conservative in the splits you make, and always keep an eye on the total duration of your build chain.</p>
<h3>Tool Support</h3>
<p>Tooling can be complex. Simple straight-line chains can be relatively easily build using most continuous build systems. For example a common approach is to have one build check in some artifact which is the trigger point for another Continuos Build to run. Such approaches have the downside that the chain isn&#8217;t explicitly modelled, and reporting of the current state of the chain ends up having to be jury rigged, typically through custom dashboards. More complex still is dealing with branching chains.</p>
<p>Continuous Build systems have got more mature of late, with many of them supporting simple Chained Continuous Builds out of the box. <a title="TeamCity Build Chains and Enhanced Build Dependencies support" href="http://www.jetbrains.com/teamcity/features/continuous_integration.html#Build_Chains_and_Enhanced_Build_Dependencies">TeamCity</a>, <a title="Hudson Downstream-Ext Plugin" href="http://wiki.hudson-ci.org/display/HUDSON/Downstream-Ext+Plugin">Hudson</a> and <a title="Cruise Features" href="http://www.thoughtworks-studios.com/cruise-release-management/features-benefits">Cruise</a> and others all have some form of (varying) support. Cruise probably has the best support for running stages in parallel (caveat: Cruise is written by ThoughtWorks, the company I currently work for), and has some of the better support for visualising the chains, but given the way all of these tools are moving expect support in this area to get much better over time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.magpiebrain.com/2010/01/24/build-pattern-chained-continuous-build/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Build Pattern: Build Time Limit</title>
		<link>http://www.magpiebrain.com/2010/01/16/build-pattern-build-time-limit/</link>
		<comments>http://www.magpiebrain.com/2010/01/16/build-pattern-build-time-limit/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 21:31:15 +0000</pubDate>
		<dc:creator>Sam Newman</dc:creator>
				<category><![CDATA[Build And Deployment Patterns]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[patterns]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[team]]></category>

		<guid isPermaLink="false">http://www.magpiebrain.com/?p=689</guid>
		<description><![CDATA[Anyone who has worked in a team which uses a Continuous Build inevitably starts to learn about the cost of a long running build: More time between checkin and a report of a failure Higher chance of Continuous Build containing multiple checkins, increasing the chance of an integration break and complicating rollback Fixing a build [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-688" href="http://www.magpiebrain.com/2010/01/16/build-pattern-build-time-limit/clock-flickr-laffy4k/"><img class="alignright size-thumbnail wp-image-688" title="Clock" src="http://www.magpiebrain.com/wp-content/uploads/2010/01/clock-flickr-laffy4k-150x150.jpg" alt="Clock - from flickr user laffy4k" width="150" height="150" /></a> Anyone who has worked in a team which uses a Continuous Build inevitably starts to learn about the cost of a long running build:</p>
<ul>
<li>More time between checkin and a report of a failure</li>
<li>Higher chance of Continuous Build containing multiple checkins, increasing the chance of an integration break and complicating rollback</li>
<li>Fixing a build related to a checkin made much earlier decreases productivity, leading to a reduction in productivity</li>
</ul>
<p>There are other &#8216;build&#8217; times to be aware of. A long <a title="magpiebrain: Build Pattern: Checkin Gate" href="http://www.magpiebrain.com/2007/01/29/build-pattern-checkin-gate/">Checkin Gate</a> build leads to an increased chance of someone else checking in before you, increasing the chance of an integration break when you do checkin. It also disrupts the developers normal flow &#8211; they cannot easily work on new code, so effectively have to down tools waiting for the Checkin Gate has finished. You also need to consider the time taken to run a single test &#8211; be it a small-scoped unit test, or a larger end to end test.</p>
<p>No matter what the build is, a long build interrupts programmer flow, decreasing focus, and therefore decreasing productivity.</p>
<h3>Different Builds, Different Limits</h3>
<p>As a team, you should decide on acceptable <strong>Build Time Limit</strong> for each &#8216;build&#8217; &#8211; for example individual tests, Checkin Gates, and stages in your continuous build. You may even consider failing these builds if those time limits fail. Setting the Build Time Limit at the right level &#8211; and keeping it there &#8211; will help keep productivity high.</p>
<p>Different builds get run with different frequencies. The more often a build is run, the faster it needs to be. Experience suggests the following time limits:</p>
<ul>
<li>Single small-scoped unit test &#8211; sub-second</li>
<li>End-to-end test &#8211; a few seconds</li>
<li>Checkin Gate &#8211; 30 seconds to a couple of minutes at most</li>
<li>Continuous Build &#8211; a handful of minutes</li>
</ul>
<p>When your Continuous Build is part of a larger Build Pipeline, you may find it useful to set Build Time Limits for each stage in the pipeline. One might argue that enforcing Build Time Limits for each stage of a Build Pipeline &#8211; manual or automated &#8211; may be overkill, but having some reporting of when a limit is exceeded will help directly highlight bottlenecks in creating production deployable software.</p>
<h3>Team Ownership</h3>
<p>Teams must take ownership of ensuring that the Build Time Limit is enforced. Further, they should always look for opportunities to reduce them further. Any decision to increase any Build Time Limit should be taken by the whole team &#8211; likewise any decrease in a Built Time Limit with decreases test coverage should be agreed with all. Everyone should be empowered however to look for quick wins.</p>
<p>Some teams find the need for a Build Tzar/Build Cop role &#8211; someone who is in charge of the health of the build. I consider such roles as being short term measures only, and should certainly be considered an anti-pattern if they exist for any length of time. At the extreme end of this spectrum is the dedicated build team. Empowering the whole team is key.</p>
<h3>Making Things Faster</h3>
<p>There are a number of ways of making individual tests fast, which will depend both on the nature of the technology being used and the way it is being used. Consider making a Checkin Gate fast using a <a title="magpiebrain: Build Pattern: Movable Checkin Gate" href="http://www.magpiebrain.com/2010/01/10/build-pattern-movable-checkin-gate/">Movable Checkin Gate</a>. Long Continuous Build times can be mitigated through the use of a <a href="http://www.magpiebrain.com/2010/01/24/build-pattern-chained-continuous-build/" title="Magpiebrain - Build Pattern: Chained Continuous Build">Chained Continuous Build</a>, perhaps as part of a larger Build Pipeline. </p>
<p>You may also want to simply remove tests that are slow but provide little coverage. Often, it may even be the case that slow running tests represent a performance issue in the system itself.</p>
<p>Some teams have also shown significant speed improvements by using the right hardware &#8211; such as faster CPUs, RAM disks or SSD drives. However simply throwing hardware at the problem can help speed a Continuous Build up, but this does little to affect the build time on local development machines &#8211; a situation where your continuous build is faster than your local development build is the opposite of what you want.</p>
<h3>Further Reading</h3>
<p>For more concrete evidence on how build times can influence the productivity of teams, <a href="http://www.grahambrooks.com/">Graham Brook&#8217;s</a> paper for Agile 2008, <a href="http://portal.acm.org/citation.cfm?id=1443512">Team Pace &#8211; Keeping Build Times Down</a>, details experiences of working with two different teams and the impact of long (and short) build times on the development team. Thanks also go to Graham for reviewing an earlier draft of this article.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.magpiebrain.com/2010/01/16/build-pattern-build-time-limit/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Build Pattern: Movable Checkin Gate</title>
		<link>http://www.magpiebrain.com/2010/01/10/build-pattern-movable-checkin-gate/</link>
		<comments>http://www.magpiebrain.com/2010/01/10/build-pattern-movable-checkin-gate/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 19:48:08 +0000</pubDate>
		<dc:creator>Sam Newman</dc:creator>
				<category><![CDATA[Build And Deployment Patterns]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[patterns]]></category>

		<guid isPermaLink="false">http://www.magpiebrain.com/?p=657</guid>
		<description><![CDATA[The Checkin Gate defines a set of tests which need to pass before a developer checks in. Typically, the tests are a subset of the total test suite &#8211; selected to provide a good level of coverage, whilst running in a short space of time. There is an inherent trade-off with a Checkin Gate though [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.magpiebrain.com/2007/01/29/build-pattern-checkin-gate/">Checkin Gate</a> defines a set of tests which need to pass before a developer checks in. Typically, the tests are a subset of the total test suite &#8211; selected to provide a good level of coverage, whilst running in a short space of time.</p>
<p>There is an inherent trade-off with a Checkin Gate though &#8211; you may end up having blank spots in your coverage of the gate itself, which can increase the frequency of build breakages in your Continuous Build. By applying a Movable Checkin Gate, you attempt to offset this shortcoming by changing what is in the Checkin Gate suite.</p>
<h3>Selection Based On Planned Work</h3>
<p>Periodically, you assess the kinds of work coming up. If you are using an iterative development process, you may do this at the beginning of each iteration. Based on the kinds of changes the team will be working on during the next period, select tests which cover these areas of code, removing others which cover functionality unlikely to change. The theory is that you are selecting tests that cover areas of code which are most likely to get broken. The tests should be selected such that they don&#8217;t exceed your <a href="http://www.magpiebrain.com/2010/01/16/build-pattern-build-time-limit/">Build Time Limit</a>.</p>
<p>After each movement of the site driving the Checkin Gate, you can assess the success by looking at the failure rate of the Continuous Build.</p>
<p>The key is to have a series of well categorized tests &#8211; tagging could work well here. </p>
<h3>Selection Based On Build Failure</h3>
<p>An alternative technique for selecting the makeup of the Checkin Gate can be based on build failures. If tests not in the Checkin Gate start failing in your Continuous Build, put them into the Checkin Gate suite, swapping out other tests to keep you below your Build Time Limit. </p>
<h3>Updates</h3>
<p>Added link to the new Build Time Limit Pattern.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.magpiebrain.com/2010/01/10/build-pattern-movable-checkin-gate/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A Brief And Incomplete History Of Build Pipelines</title>
		<link>http://www.magpiebrain.com/2009/12/13/a-brief-and-incomplete-history-of-build-pipelines/</link>
		<comments>http://www.magpiebrain.com/2009/12/13/a-brief-and-incomplete-history-of-build-pipelines/#comments</comments>
		<pubDate>Sun, 13 Dec 2009 14:59:36 +0000</pubDate>
		<dc:creator>Sam Newman</dc:creator>
				<category><![CDATA[Build And Deployment]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[devops]]></category>

		<guid isPermaLink="false">http://www.magpiebrain.com/?p=512</guid>
		<description><![CDATA[Recently, both Paul Julius and Chris Read pointed out that I was perhaps the first person to document the concept of build pipelines, at least in terms of how it relates to continuous integration and the like. As it turns out, the original posts on the subject are from further back than I remember: An [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, both <a href="http://www.pauljulius.com/">Paul Julius</a> and <a href="http://blog.chris-read.net/">Chris Read</a> pointed out that I was perhaps the first person to document the concept of build pipelines, at least in terms of how it relates to continuous integration and the like. As it turns out, the original posts on the subject are from further back than I remember:</p>
<ul>
<li><a href="http://www.magpiebrain.com/2005/01/07/an-introduction-to-build-pipelining/">An Introduction To Build Pipelining</a>, 7th January 2005</li>
<li><a href="http://www.magpiebrain.com/2005/01/10/automating-the-build-pipeline/">Automating The Build Pipeline</a>, 10th January 2005</li>
<li><a href="http://www.magpiebrain.com/2005/02/14/the-agile-release-process/">The Agile Release Process</a>, 14th of February, 2005</li>
</ul>
<p>I plan to pull together my previous posts on the subject and update them a little, but in the meantime thought I&#8217;d give a bit of background as to where much of this came from.</p>
<h3>A Harsh Introduction</h3>
<p>My first exposure to continuous integration was by being dropped in at the deep end during my first ThoughtWorks project. The project in question was for an electronic point of sale system, and at its peak had over 50 developers in three countries working on the project. During this time I started reading up on the topic, specifically <a href="http://martinfowler.com/articles/originalContinuousIntegration.html">Martin Fowler &amp; Matt Foemmel&#8217;s</a> paper on the topic (Martin has since created an <a href="http://martinfowler.com/articles/continuousIntegration.html">updated version</a>).</p>
<p>Much of the experiences at this first, large project were dominated by long, slow build times, caused in part by an inability to separate out activities being performed by individual teams. A full discussion as to things we learnt from that project can certainly wait for another time, but I came out of that experience liking the concept of Continuous Integration, but feeling incredibly constrained by the actual implementation.</p>
<h3>Monkeying Around</h3>
<p>Subsequently, I worked as what we used to call a &#8216;Build Monkey&#8217; at a London-based ISP. My role (which we now tend to call an Environment Specialist) was typically to identify the causes of build failure, keep the build running smoothly, as well as manage deployments to a number of different environments. Throughout this time, discussions around the theory behind managing Continuous builds for larger software teams was continuing &#8211; primarily with colleagues like <a href="http://www.build-doctor.com/">Julian Simpson</a>, Jack Bolles &amp; others.</p>
<p>The challenge we seemed to face, time and again, was how you balance the various activities associated with getting software from developers machines into production, all whilst providing the fastest feedback possible.</p>
<p>Typically, we came at the problem from two different directions &#8211; in the first instance from the point of view of how to hammer our tools into supporting the kind of processes involved, but the more important angle was understanding what the pipeline &#8211; from developer workstation to production &#8211; actually was. This thinking can now be best thought of in terms of <a href="http://timothyfitz.wordpress.com/2009/02/08/continuous-deployment/">Continuous Deployment</a> &#8211; although that topic is far more nuanced that the often simplistic thinking regarding systems where 50 deployments a day is possible, or even desirable.</p>
<h3>The Present Day</h3>
<p>Since I wrote my original articles, many other people have done work in this area, to the extent that tools like ThoughtWork&#8217;s own <a href="http://www.thoughtworks-studios.com/cruise-release-management">Cruise</a> builds support for build pipelining &amp; visualisation directly into the tool.</p>
<p class="update">Update 1: Corrected spelling of Paul&#8217;s surname &#8211; sorry Paul!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.magpiebrain.com/2009/12/13/a-brief-and-incomplete-history-of-build-pipelines/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Build Pattern: Build Fix Flag</title>
		<link>http://www.magpiebrain.com/2007/01/31/build-pattern-build-fix-flag/</link>
		<comments>http://www.magpiebrain.com/2007/01/31/build-pattern-build-fix-flag/#comments</comments>
		<pubDate>Wed, 31 Jan 2007 09:25:05 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Build And Deployment Patterns]]></category>

		<guid isPermaLink="false">http://www.magpiebrain.com/blog/2007/01/31/build-pattern-build-fix-flag/</guid>
		<description><![CDATA[When using a Continuous Integration build, before long you&#8217;ll break it. Breaking a build is not a bad thing, however it is typically the team&#8217;s top priority to have such a build fixed. Beyond the shame associated with having been named as the breaker, you then have the hassle of lots of people informing you [...]]]></description>
			<content:encoded><![CDATA[<p>When using a Continuous Integration build, before long you&#8217;ll break it. Breaking a build is not a bad thing, however it is typically the team&#8217;s top priority to have such a build fixed. Beyond the shame associated with having been named as the breaker, you then have the hassle of lots of people informing you you&#8217;ve broken it.</p>
<p>As a way of letting the development team know that:</p>
<ul>
<li>You know the build is broken</li>
<li>You are fixing it</li>
</ul>
<p>A simple broadcast mechanism can be highly useful.</p>
<h3>Example</h3>
<p>Whilst I have seen high-tech solutions being recommended, the most effective example of a Build Fix Flag I&#8217;ve seen is simply using a giant paper flag. It was about 2 1/2 feet in height, and could be clearly seen above monitors. When a build failure was seen, a quick glance across the floor would indicate if someone was working on it.</p>
<p>What was nice was that before long, the same mechanism was used for notification of a number of development environments</p>
<h3>Rules for the build fix flag</h3>
<p>When using such a flag, we quickly decided on a set of rules as to how to use it:</p>
<ol>
<li>If you saw a CI build breakage, you looked for the flag</li>
<li>If someone had the flag, you left them alone</li>
<li>If you couldn&#8217;t see the flag, you tried to identify the person who made the last check in</li>
<li>If you couldn&#8217;t find a likely culprit, you raised the flag and fixed it yourself</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.magpiebrain.com/2007/01/31/build-pattern-build-fix-flag/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Build Pattern: Fish-eye Test Suite</title>
		<link>http://www.magpiebrain.com/2007/01/29/build-pattern-fish-eye-test-suite/</link>
		<comments>http://www.magpiebrain.com/2007/01/29/build-pattern-fish-eye-test-suite/#comments</comments>
		<pubDate>Sun, 28 Jan 2007 23:41:40 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Build And Deployment Patterns]]></category>

		<guid isPermaLink="false">http://www.magpiebrain.com/blog/2007/01/29/build-pattern-fish-eye-test-suite/</guid>
		<description><![CDATA[When running a suite of tests &#8211; either as part of a Continuous Integration build, or part of a check-in gate &#8211; speed is the enemy. You are always trying to find the balance between test coverage and time to complete the entire suite. Both a check-in gate and continuous integration build have slightly different [...]]]></description>
			<content:encoded><![CDATA[<p>When running a suite of tests &#8211; either as part of a Continuous Integration build, or part of a <a href="http://www.magpiebrain.com/blog/2007/01/29/build-pattern-checkin-gate/" title="Magpiebrain - Build Pattern: Check-in Gate">check-in gate</a> &#8211; speed is the enemy. You are always trying to find the balance between test coverage and time to complete the entire suite.</p>
<p>Both a check-in gate and continuous integration build have slightly different time pressures. The optimal duration for both will probably vary from team to team. A fish-eye suite is one way of formulating which tests should be included.</p>
<p>In a fish-eye suite, you focus on those tests which provide the best coverage for those areas of functionality currently being developed, whilst those areas not directly being affected have only minimal coverage. The logic goes that tests are there to pick up bugs, and therefore tests which cover the functionality currently being worked on are the most important.</p>
<h3>Regularly changing the focus</h3>
<p>In an iterative development process, working out where to change the focus of the suite can be easy. At the beginning of each iteration, the team as a whole decide which tests (or group of tests) should be run in each suite. During a development process where there is less segmentation,  changing the suite on an ongoing basis may be more sensible</p>
<h3>Reactive test suite</h3>
<p>Rather than changing the focus of the suite at the start of each iteration, you can also decide to adapt the contents of the suite in certain situations &#8211; for example when the total time for the suite to run exceeds an agreed limit, or the number of bugs reported against a functional area increases.</p>
<p>For example, the team may decide that the check-in gate build should take 30 seconds, and the CI build should take no more than five minutes. The moment they take longer, the team as a whole should redefine what tests should be included. When removing tests, the team should look to remove those tests which cover areas of functionality furthest away from those currently being worked on.</p>
<p>Likewise if the number of bugs being raised against a certain functional area increase, the development team may decide that increasing the test coverage of a certain area makes sense. Again, the team may have to remove some tests in order to still be within the optimal build time. In which case, tests associated with areas of functionality with low defect rates make a good candidate for removal.</p>
<h3>Source-Code Management</h3>
<p>Being able to create and manage a fish-eye suite presupposes that you group your tests into functional areas. This can be an issue with typically packaging structures which are defined in horizontal terms, whereas the long running functional tests should cover a vertical slice of functionality.</p>
<p>Even if initially you aren&#8217;t going to use fish-eye suites, grouping your tests into functional (vertical) groupings rather than system (horizontal) groupings makes sense as it allows to to easily use this approach later. It also tends to make more sense to testers who see things in terms of usable functions rather than horizontal tiers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.magpiebrain.com/2007/01/29/build-pattern-fish-eye-test-suite/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Build Pattern: Checkin Gate</title>
		<link>http://www.magpiebrain.com/2007/01/29/build-pattern-checkin-gate/</link>
		<comments>http://www.magpiebrain.com/2007/01/29/build-pattern-checkin-gate/#comments</comments>
		<pubDate>Sun, 28 Jan 2007 23:07:48 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Build And Deployment Patterns]]></category>

		<guid isPermaLink="false">http://www.magpiebrain.com/blog/2007/01/29/build-pattern-checkin-gate/</guid>
		<description><![CDATA[It&#8217;s common practise within a team to define a set of tasks which should be run by each developer prior to checking in. The purpose of the Check-in Gate is to attempt to ensure that all code satisfies some basic level of quality. Like all development standards, a check-in gate helps a team stay on [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s common practise within a team to define a set of tasks which should be run by each developer prior to checking in.  The purpose of the Check-in Gate is to attempt to ensure that all code satisfies some basic level of quality.</p>
<p>Like all development standards, a check-in gate helps a team stay on the same page. It eases integration, and can help give confidence as to the quality of the code checked in.</p>
<h3>Check-in Gate with Continuous Integration</h3>
<p>A check-in gate is typically used prior to checking in to a system which uses Continuous Integration &#8211; where the tasks in run during the check-in gate are the same tasks used as part of the continuous integration build. The main source of embarrassment associated with breaking a CI build tends to come down to the fact that the shamed individual completely forgot to run their check-in gate build.</p>
<h3>The importance of speed</h3>
<p>Check-in Gates need to be fast. The longer they take to run, the less developers will want to run them &#8211; this either results in less frequent check-ins or in developers not running them at all. Fewer check-ins result in more complex (and more error prone) integrations. Not running the check-in gate at all can result in a breakdown of code quality and can be a slippery slope to the gate being abandoned altogether.</p>
<h3>Examples</h3>
<p>The simplest example of a check-in gate would probably be ensuring that the code compiles prior to check-in. More often, the team will decide to run either some or all of a test suite.  Again the constraining factor as to what you&#8217;ll want to run as part of a check-in gate is typically time &#8211; deciding how and what to run should always be defined by the team.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.magpiebrain.com/2007/01/29/build-pattern-checkin-gate/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The Agile Release Process</title>
		<link>http://www.magpiebrain.com/2005/02/14/the-agile-release-process/</link>
		<comments>http://www.magpiebrain.com/2005/02/14/the-agile-release-process/#comments</comments>
		<pubDate>Mon, 14 Feb 2005 11:09:00 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Build And Deployment]]></category>

		<guid isPermaLink="false">http://www.magpiebrain.com/2005/02/14/the-agile-release-process/</guid>
		<description><![CDATA[I&#8217;ve seen the diagram below used to describe &#8220;Agile Development&#8221;. I found it to be quite a good overview of a typical agile development process. Release, to my mind, is the delivery of business value to the client &#8211; the process of taking your wonderful code, packaging it up, and delivering it in a nice [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve seen the diagram below used to describe &#8220;Agile Development&#8221;. I found it to be quite a good overview of a typical agile development process.</p>
<p><img alt="agile_software_development_cycle.gif" src="http://www.magpiebrain.com/archives/images/agile_software_development_cycle.gif" width="430" height="404" /><br />
<span id="more-302"></span><br />
Release, to my mind, is the delivery of business value to the client &#8211; the process of taking your wonderful code, packaging it up, and delivering it in a nice little bundle to your client. In this diagram, a release is simply something that happens when you have no stories left. Not only does this jar with the agile/XP concept of &#8220;release early, release often&#8221;, but it radically oversimplifies the kind of checks that might need to be done prior to a release being ready (here simply called &#8220;System Testing&#8221;).</p>
<p>A month or so back I had a chat with a colleague, where he talked about a different way of deciding what is ready for release. He talked about a series of tests that a system must pass in order for a build to be considered &#8220;Ready For Release&#8221;.</p>
<p> <img alt="agile_release_process.gif" src="http://www.magpiebrain.com/archives/images/agile_release_process.gif" width="430" height="330" /></p>
<p>Anything which made it up to the top level was eligible for release. When the deployment team was ready for or needed a release, they would look at the current stack of eligible releases, and be pick the latest one, or perhaps the first release in the stack which met their requirements (which of course would come from business requirements). What I really liked was that such a process really encourages frequent releases, more so than the process outlined in the first diagram &#8211; it is based not on &#8220;have we done all the work&#8221; lines, but on &#8220;could we release this&#8221; lines.</p>
<p>As developers, our success is not rated by lines of code, or a stories completed, but by what actually gets delivered to the business. Perhaps we need to be thinking less about an agile development processes, and more about agile release processes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.magpiebrain.com/2005/02/14/the-agile-release-process/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Automating the build pipeline</title>
		<link>http://www.magpiebrain.com/2005/01/10/automating-the-build-pipeline/</link>
		<comments>http://www.magpiebrain.com/2005/01/10/automating-the-build-pipeline/#comments</comments>
		<pubDate>Mon, 10 Jan 2005 14:01:30 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Build And Deployment]]></category>

		<guid isPermaLink="false">http://www.magpiebrain.com/2005/01/10/automating-the-build-pipeline/</guid>
		<description><![CDATA[As described before, the build pipeline is a series of builds, each performing some specific task. The result of one build becomes the input of the next. Many people see the pipeline describing only those parts which can be automated &#8211; as such, you&#8217;ll often see the pipeline end far short of production ready code &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>As <a title="magpiebrain - An introduction to build pipelining" href="http://www.magpiebrain.com/blog/2005/01/07/an-introduction-to-build-pipelining/">described before</a>, the build pipeline is a series of builds, each performing some specific task. The result of one build becomes the input of the next.</p>
<p>Many people see the pipeline describing only those parts which can be automated &#8211; as such, you&#8217;ll often see the pipeline end far short of production ready code &#8211; once it&#8217;s got past the final automated barrier, the code then plunges into a grey mass of manual, distributed, often ad-hoc processes. For the build pipeline to work at all, it has to be continued all the way to producing production ready code. That is <em>not</em> to say the whole pipeline should be automated.</p>
<p><span id="more-300"></span><br />
The decision on what should/could be automated is secondary to the decision on what your pipeline should be &#8211; and the exact nature of the pipeline depends on the nature of the project you are on.</p>
<p>Build automation comes at a cost, and that cost has to be justified in terms of the benefits it brings &#8211; I would argue that the less a particular build is run, the less benefit will be gained from automating that part of the build. It might not even be possible to automate some parts of the pipeline &#8211; for example, what if you&#8217;d decided to make the final barrier of code acceptance a 2 week trial in your call centre?</p>
<p>In figure 1, we have a relatively simplistic pipeline. Our developer and QA builds are run fairly often, so we have automated them. The soak and operational acceptance tests are not, so we kept these as manual processes.</p>
<div>
<p><a href="http://www.magpiebrain.com/archives/images/build-pipeline-automation.gif"><img src="http://www.magpiebrain.com/archives/images/build-pipeline-automation-thumb.gif" alt="build-pipeline-automation.gif" width="400" height="386" /></a></p>
<p>Figure 1 &#8211; an example of a mixed automated and manual build pipeline</p></div>
<p>The interesting point here is that we may need some way for the artifact of an automated build to become the input of a manual build, and likewise the output of a manual builds to become the input of an automated build. I&#8217;ve seen ad-hoc processes for handling the result of automated builds becoming the input of subsequent automated builds (for example the remote-force build support in CruiseControl, or child builds) but I&#8217;ve yet to see a satisfactory solution to bridging the gap between manual and automated builds. Such a solution might want to become part of a higher-level pipeline management tool, responsible for keeping track of where a given check-in is in the process.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.magpiebrain.com/2005/01/10/automating-the-build-pipeline/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
