Thursday, March 6, 2008

Continuous Builds with Web Services

In two of my current projects, I am working with clients that are moving to continuous builds from complete manual processes. What is a continuous build you may ask? Well anytime a change in the source code repository occurs, a build could be triggered and deployed to a development server. As part of the build process a suite of Unit Tests could be executed to confirm there is no regression in capabilities. Companies like Cape Clear employ this process to develop daily builds which are much improved in quality over the previous semi-automated processes.

The ingredients to this always falls into the same basic technologies and like most people OSS provides the answers:

- CruiseControl for the continuous build management
- Apache Ant for the build scripts
- JUnit for Unit Testing
- Some sort of Version Control Repository like SVN or SCM
- Web Service Container / ESB (Cape Clear or the like)

So is it difficult? Well I was suprised to see how quickly CruiseControl could be downloaded, started and configured through two configuration files (config.xml and build-.xml). In just a couple of hours the software was downloaded and a build was completed.

The necessary components to execute the build are the configurations described above but also the main build.xml that in the case of Cape Clear, invoked the Eclipse Buckminster Framework. This effectively creates a headless Eclipse Workspace and allows the ant script to run the validators, package the content, deploy it and test it. Since the Web Service/BPEL developer is not writing a compiled language, the validators are the key component in the build process.

Other things that I need to complete revolve around the rewriting of URLs or namespaces depending on which environment the build is being created for. Ant provides a soluton there via the replace feature which allows for the search/replace of tokens. This functionality is extremely helpful in complex BPEL where many partner services equates to many WSDL/endpoints. The other feature not complete is the execution of a JUnit test case using the Buckminster/Cape Clear launch feature.

No comments: