<?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>Sébastien Barbieri's blog &#187; svn</title>
	<atom:link href="http://blog.sbw.be/tag/svn/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sbw.be</link>
	<description>My life, my work, my projects</description>
	<lastBuildDate>Mon, 28 Jun 2010 05:28:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>#web #continuous #integration: #Autodeploy on #commit</title>
		<link>http://blog.sbw.be/2009/12/11/web-continuous-integration-auto-deploy-on-commit/</link>
		<comments>http://blog.sbw.be/2009/12/11/web-continuous-integration-auto-deploy-on-commit/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 20:13:13 +0000</pubDate>
		<dc:creator>Sébastien Barbieri</dc:creator>
				<category><![CDATA[freelance]]></category>
		<category><![CDATA[truc de g33k]]></category>
		<category><![CDATA[commit]]></category>
		<category><![CDATA[continuous]]></category>
		<category><![CDATA[deploy]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.sbw.be/?p=341</guid>
		<description><![CDATA[Option 1
In 4 steps

svn commit to the repository
the pre-commit hook will check the code with svnlook and will validate the commit message (based on regexp such has bug# &#8230;, text minimal size&#8230;)
the post-commit hook will try to connect to the ITT (Integration Team Testing) if you have the good acronym, I&#8217;ll update
once connected a script [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Option 1</strong></p>
<div id="attachment_342" class="wp-caption aligncenter" style="width: 1011px"><a href="http://blog.sbw.be/wp-content/uploads/2009/12/PostCommitAutoDeploy.png"><img src="http://blog.sbw.be/wp-content/uploads/2009/12/PostCommitAutoDeploy.png" alt="post commit auto deploy" title="PostCommitAutoDeploy" width="1001" height="449" class="size-full wp-image-342" /></a><p class="wp-caption-text">post commit auto deploy</p></div>
<p>In 4 steps</p>
<ol>
<li><strong>svn commit</strong> to the repository</li>
<li>the <strong>pre-commit hook</strong> will check the code with <a href="http://svnbook.red-bean.com/en/1.5/svn.reposadmin.maint.html#svn.reposadmin.maint.tk.svnlook">svnlook</a> and will validate the commit message (based on regexp such has bug# &#8230;, text minimal size&#8230;)</li>
<li>the <strong>post-commit hook</strong> will try to connect to the ITT (Integration Team Testing) <em>if you have the good acronym, I&#8217;ll update</em></li>
<li>once connected a script should be launched (and forgot &#038;;) This script should:
<ul>
<li><strong>Do a svn checkout locally so the code could be tested (in /var/www &#8230;)</strong>. <em>This method has several drawback:  instability of the site while exporting, destruction of ITT generated file (if any)&#8230;</em></li>
<li>Do a<strong> svn checkout in a temporary directory</strong> (/export/&lt;projectname&gt;) and then use <strong>rsync</strong> to do a fast compare and copy changes only without deleting the existing, excluding the .svn folders</li>
<li>Do a<strong> svn export in a temporary directory</strong> (/tmp/&lt;projectname&gt;) and then use the same <strong>rsync</strong> than above but this time you don&#8217;t have to exclude the .svn</li>
</ul>
<p>The fastest is the second one (svn checkout -> /export/&lt;projectname&gt; + rsync &#8211; .svn folders)
 </li>
</ol>
<p><strong>Option 2</strong></p>
<p>There is another <strong>alternative</strong> if you have space and sufficient right on your <strong>svn repository</strong>: the svn export/svn checkout is done locally and you use rsync to <strong>deploy</strong> the site on the ITT server.</p>
<p><strong>Option 3</strong></p>
<p>There is a third <strong>alternative</strong> if you have one more server (a synchro server) that will be used to store the svn export (at least the last one and maybe 2-3 version before) and that will take care of the rsync between one of its local checkout/export and the ITT server.</p>
<p><strong>Conclusion</strong></p>
<p>The last option has the big advantage of being a intermediate repository that can deploy any revision to any server &#8230; but that&#8217;s another paper.</p>
<p>I used the 3 options, and the first one (the simplest/cheapest) is very easy to maintain and to set up, so it&#8217;s a must have for team < 15 &#8230; bigger team may think about the other options but will have to put additional resources to design the whole deployment system.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sbw.be/2009/12/11/web-continuous-integration-auto-deploy-on-commit/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
