<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Software Development is a Team Sport! : CI</title><link>http://blogs.msdn.com/aridle/archive/tags/CI/default.aspx</link><description>Tags: CI</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Continuous Integration</title><link>http://blogs.msdn.com/aridle/archive/2005/11/11/continuous-integration.aspx</link><pubDate>Sat, 12 Nov 2005 06:10:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:492007</guid><dc:creator>aridle</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/aridle/comments/492007.aspx</comments><wfw:commentRss>http://blogs.msdn.com/aridle/commentrss.aspx?PostID=492007</wfw:commentRss><wfw:comment>http://blogs.msdn.com/aridle/rsscomments.aspx?PostID=492007</wfw:comment><description>&lt;DIV class=aor&gt;
&lt;P&gt;This week, I spent some time learning Team Build and configuring a build server for Continuous Integration (CI).&amp;nbsp; I’ll tell you more about that experience in a separate post.&amp;nbsp; But, before I go there, I want to make sure everyone is on the same page.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;For those of you unfamiliar with the practice…&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Continuous Integration&amp;nbsp;is a mainstay in many agile tool belts.&amp;nbsp; The idea behind&amp;nbsp;it is that the longer you wait to integrate your code with the code of your peers, the harder it will be to do the integration.&amp;nbsp; Many developers have direct experience with this phenomenon.&amp;nbsp;&amp;nbsp;Those who have been through it have a name for it:&amp;nbsp;&amp;nbsp;integration hell.&lt;/P&gt;
&lt;P&gt;When combined with a comprehensive suite of unit tests, CI helps to prevent integration hell by encouraging developers (and testers) to make frequent check-ins.&amp;nbsp; In fact, many agile developers integrate their code as frequently as every ten minutes (or faster!).&amp;nbsp; That might seem extreme.&amp;nbsp; But, it’s true.&amp;nbsp; We do it here in &lt;EM&gt;patterns &amp;amp; practices.&lt;/EM&gt;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;In general, the CI&amp;nbsp;integration process looks like this:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Get the source from the repository and merge your local changes (if there are conflicts)&lt;/LI&gt;
&lt;LI&gt;Run all of the unit&amp;nbsp;tests (to make sure you didn’t break anything)&lt;/LI&gt;
&lt;LI&gt;Fix any broken tests (even if you didn’t write them)&lt;/LI&gt;
&lt;LI&gt;Once all of the tests pass, commit your changes to the repository&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;In the early days of agile, many teams serialized this process by only allowing one developer (or one pair of developers) to integrate their code at a time.&amp;nbsp; This prevented people from committing conflicting changes to the repository at the same time, which made integration much easier.&amp;nbsp; But, the serialization clearly introduced a bottleneck.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Enter Continuous Integration Servers…&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;A CI server is a build server that runs a new build every time someone commits a change to the source code repository.&amp;nbsp; When a team introduces a CI server, they can stop serializing integrations because the server will inform them immediately when something breaks the build or causes a test to fail.&amp;nbsp; Instead of mitigating the risk of simultaneous integration through serialization, CI servers mitigate this risk by providing&amp;nbsp;immediate feedback about integration problems.&lt;/P&gt;
&lt;P&gt;For the curious, CI Servers integrate with source control servers in one of two ways:&amp;nbsp; passively or actively.&amp;nbsp; Passive integration involves the Observer pattern:&amp;nbsp; the&amp;nbsp;CI server registers for events fired by the source control server.&amp;nbsp; Active integration involves polling the source control server at predetermined intervals, looking for changes.&amp;nbsp;&amp;nbsp;If your source control server doesn’t expose it’s event model, then you’re stuck with active integration.&amp;nbsp; The advantage of passive integration is that it gives your CI server the opportunity to control exactly which changes make it into each build.&amp;nbsp; The fewer changes compiled in a build, the easier it is to debug any problems that do occur.&lt;/P&gt;
&lt;P&gt;Are you doing CI?&amp;nbsp; Got questions?&amp;nbsp; Drop me a line!&lt;/P&gt;&lt;/DIV&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=492007" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/aridle/archive/tags/Agile/default.aspx">Agile</category><category domain="http://blogs.msdn.com/aridle/archive/tags/TFS/default.aspx">TFS</category><category domain="http://blogs.msdn.com/aridle/archive/tags/CI/default.aspx">CI</category></item></channel></rss>