Search code examples
svndeploymentantbuild-automationrelease-management

Automated deployment using Ant or similar


I want to sort out out our deployment process and I was hoping to use Ant or a similar build tool to design and implement a one-click deployment of a specific SVN revision to multiple servers.

We use ColdFusion as our application server so we usually just upload a set of changed files to all our servers. There is no compile step.

The process would be as follows:

  • Get a particular revision from SVN and export it to a temp dir
  • Copy/FTP all the files in the directory to a set of web servers
  • Switch the deployment destination as required for test / staging / production etc.
  • In future we'd like to add database schema changes to this process

Is it possible to do this using Ant or are there better open source tools for the job? I'm interested in SVN intergration in particular.

I'd love to hear any experiences in this area. Thanks in advance.


Solution

  • Yes, there are numerous sources on this one:

    http://subversion.open.collab.net/articles/IntegratingSubversionIntoYourAntBuild.html

    http://ant.apache.org/manual/Tasks/ftp.html or http://www.developer.com/java/print.php/998241

    Also, I'm not sure what the equivalent is in the Cold Fusion world, but you should look into Unit Testing and a linting tool. A linting tool can check for invalid syntax and basic structures. The invalid syntax part is key.. because you can have the task stop if there's a problem as opposed to deploying known-broken code.

    It's just a matter of setting up the individual targets (tasks) and stringing them together in the right order.