04
Nov
08

Continuous Integration and Flex

Our server-side programmers have a continuous integration system up and running. Using CruiseControl.Net, most of our sites are tested every time framework updates are committed to subversion. It is useful (bugs are detected early) and it gives you the good feeling of work being done without any effort on your side.

I have been envious of them for a while and wanted a similar set-up for Flex projects. I found a good, thorough description here and assumed that this would be fairly easy. I’ve been wrong before. It took lots of time, partly because the instructions are for a Java environment and we’re running .net versions.

First problem was that the ant dialect supported directly by CruiseControl.Net – Nant – isn’t really compatible with Apache.ant. Frustrating. So then I installed Java JDK and Ant. This worked a whole lot better, ant scripts used in Flex ran without problems. But that meant calling .bat files that called the ant xml that did the compilation. I’m not very good with either bat or ant syntax, so this was awkward.

With the assistance of Papirfly’s alpha-nerd, it got sewn together. The hardest problem was that errors weren’t detected until we rewrote the ant.bat, i.e. the script that runs the ant scripts. We added

if not errorlevel 0 exit /b %errorlevel%

in bin/ant.bat, line 134 – that is in the :runAnt part of the script. The side effect is that if you run ant manually in the console, it will just close if ant encounters an error. Best to use it only on the machine running CruiseControl.

The end result is a satisfying system where Flex projects are also complied (or rather attempted) on committed framework changes. We also build fresh documentation of our framework with asdoc – look ma, no hands!

Spending a day and a half to avoid boring menial tasks – that what being a nerd is all about!

Advertisements

0 Responses to “Continuous Integration and Flex”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: