<?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>Game g = new Game(); &#187; svn</title>
	<atom:link href="http://thomasschweitzer.com/tag/svn/feed/" rel="self" type="application/rss+xml" />
	<link>http://thomasschweitzer.com</link>
	<description>Nerdy thoughts</description>
	<lastBuildDate>Tue, 12 Apr 2011 13:33:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Build environment</title>
		<link>http://thomasschweitzer.com/2009/01/29/build-environment/</link>
		<comments>http://thomasschweitzer.com/2009/01/29/build-environment/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 18:38:43 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Atlantis]]></category>
		<category><![CDATA[technics]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[build environment]]></category>
		<category><![CDATA[build process]]></category>
		<category><![CDATA[Jira]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[TeamCity]]></category>

		<guid isPermaLink="false">http://thomasschweitzer.com/?p=134</guid>
		<description><![CDATA[For some time now I wanted to blog about our build process and the environment and tools I have set up for developing our multiuser browser community. There are several subteams involved in the project : Web developers working on the public website and the administration interface &#8211; they are producing standard HTML, JavaScript, PHP [...]]]></description>
			<content:encoded><![CDATA[<p>For some time now I wanted to blog about our build process and the environment and tools I have set up for developing our multiuser browser community.</p>
<p>There are several subteams involved in the project :</p>
<ul>
<li>Web developers working on the public website and the administration interface &#8211; they are producing standard HTML, JavaScript, PHP files and images</li>
<li>Flash coders implementing the actual game client and the minigames &#8211; lots of FLAs and resources, then compiled into modular SWFs</li>
<li>Game backend developers extending the multiuser socket server functionality -  this is a complete Java subproject on its own</li>
</ul>
<p>All of them are working in sub directories of a single <a href="http://subversion.tigris.org/">svn</a> repository. Maybe I will go into details about repository selection at a later date, but svn seemed the most pragmatic choice, with support and integration for several IDEs and platforms.</p>
<p>Having experimented with <a href="http://cruisecontrol.sourceforge.net/">CruiseControl</a> and <a href="https://hudson.dev.java.net/">hudson</a> as continuous integration platforms before, I wanted to try out <a href="http://www.jetbrains.com/teamcity/index.html">TeamCity</a> &#8211; distributed build management sounded pretty interesting: You don&#8217;t have to checkout and build everything on one machine, but you can install remote build agents on several machines, and control them from a central server.</p>
<p>TeamCity is constantly watching svn for commits and triggering a new build, if it found a new revision in the repository.</p>
<p>The deployment script itself is your &#8220;typical&#8221; ant build script. My initial version checked out all the website and flash resources on the TeamCity machine itself, and copied everything via scp to the test server.</p>
<p>The script also rebuilds and deploys the Java sources to the multiuser socket server, generates javadocs and FTPs them to a webserver, and restarts the multiuser socket server.</p>
<p>I was not sure whether it&#8217;s possible (and makes sense) to automate the compilation of the Flash sources into SWFs, and the Flash developers were more happy to commit both FLAs and SWFs.</p>
<p>The problem was that copying the whole website structure was taking a long time, starting from 15 minutes for even small changes, up to more than 1 hour for bigger changes.</p>
<p>Thankfully, build times could be reduced drastically by installing a build agent on the test server itself. After authenticating this agent with the TeamCity server, we could checkout and build directly in a tmp directory on the test server (which was way faster, because only the modified files needed to be fetched form the repository), thereby reducing the deployment times to less than 1 minute (!).</p>
<p>(In retrospect, I could have spent some time making the copying via scp-target a bit more clever (and a lot faster) by copying only dirty directories, but I had no idea how to check for dirty files or directories for resources like PHP and CSS files.)</p>
<p>We use <a href="http://www.atlassian.com/software/jira/">Jira</a> for issue tracking, and the <a href="http://confluence.atlassian.com/display/JIRAEXT/JIRA+Subversion+plugin">subversion plugin</a> makes it easy to link repository commits to Jira tickets by adding the Jira ID to the commit comment. (We do not use any automated workflow, so the developer still has to resolve the Jira issue manually.)</p>
<p>So that&#8217;s about it. So far I&#8217;m pretty happy with the setup &#8211; of course, there is always room for improvement, but we are running this build process now for almost 5 months without any major hickups, and people can rely on their changes in the repository being available on the testserver within minutes.</p>
]]></content:encoded>
			<wfw:commentRss>http://thomasschweitzer.com/2009/01/29/build-environment/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

