tags:

views:

442

answers:

2

Is anyone using TeamCity for building their Flex apps? We're using .Net for our main site code and backend flex data calls and we use flex for our application. I have a working Ant build script, but I can't get it to run with the TeamCity Ant Runner. I'm curious if anyone has gotten this working and if they have, could I potentitially see a sample of your build script?

For some reason the build script won't pick up the FLEX_HOME environment variables for the Flex Ant Tasks.

A: 

On a previous project I worked on we had exactly the same situation as you and it can work. I can't remember doing anything special to get this going although we may have had to manually set some environment variables in the TeamCity config. Check out the TeamCity docs for how to set these and how to they are used

You might also try using the basic Command line runner to see if that works. When troubleshooting environment variable issues in TeamCity I have found it useful to have part of the build process run a DOS set command (env for Linux) and then look in the build logs to see what the actual environment is.

Brett Carswell
Thanks for the tips Brett. I eventually got it going. I had to un-install a bunch of programs on the build server. They had FlexBuilder 2 and FlexBuilder 3 installed on the same box. Plus a few version of Java. Now it's all cleaning and building perfectly.
CodeMonkey
+1  A: 

I cannot see why it shouldn´t work. Just declare FLEX_HOME in the top of your Ant script, and point to the sdk on the TeamCity machine, like:

<property name="FLEX_HOME" value="c:/adobe/flex/sdk/3.3"/>
subotnik