Extending AnthillPro through Inline Build Scripting

Most AnthillPro build script integrations allow the user to enter the build script in on the final tab. This is the mysterious "Script" tab that nearly everyone ignores. It is really quite powerful though. A build script entered into that tab will be created by AnthillPro at the script location specified and the executed..

This can be useful in a number of places. Consider a need to create some property file in a build or deployment directory. AnthillPro has no "create file" step, and cross platform command line options are limited.

Instead, we can create an inline Ant script command and use that as our cross-platform "create a file" step. Create an Ant script step, and apply any properties that change between environment as something like value=${property:AnthillValue} . Then, in the script tab, add an Ant script that will generate your file based on those properties. Something like:

<project name="File Creation" default="create-file" basedir=".">
  <target name="create-file">
    <echo file="some_file.properties" append="false">static=stable
dynamic=${value}
    </echo>
  </target>
</project>


Now when we run this script and set the AnthillValue property to "widget", we'll get a file called
some_file.properies with the contents:

static=stable
dynanmic=widget


The configuration was pretty small and we get a file created in a cross platform way with the contents of our choosing. Again, most of our integrated scripting languages will work with this approach, but you will need to make sure the scripting tool is on the target machines. Anthill installs a copy of Ant with the agent, so this is a surety for Ant.



© 2006-2007 Urbancode, Inc.
Anthill, AnthillPro, and AnthillOS are trademarks of Urbancode, Inc.
All other trademarks are owned by their respective owners.
tel: (216) 858-9000 fax: (216) 858-6902 email:info@urbancode.com