Aug 26, 2010

Automatic deployment part 3

I finished writing the Ant build script for first of our PHP projects. I made plenty of tests. At the end script consists of four parts. I send several parameters to Ant. The most important is destination - devel, test, prod. For each destination I have separate configuration file. The Ant build script then does following:
  1. Init - prepares build directory structure.
  2. Prepare - copies all files to build directory. In this step an .htaccess for proper destination is copied at proper place in the build directory structure.
  3. Transfer - transfers whole build directory to the destination.
  4. Remote-deploy - executes series of commands over sshexec. Most of them creates links to newly uploaded build.
So far it works. I'd like to figure out dependencies on other projects as this project itself needs our framework....

The biggest problem for me was to figure out why copy target did not exclude certain directories. But after few hours I figured that out also.

No comments: