Integrate Button Weblog

Archive for the '/Andy' Category

CI with Hudson, Ant, and Subversion tutorial

Wednesday, November 21st, 2007

In case you can’t get enough of CI from the book, check out “Spot defects early with Continuous Integration” at IBM developerWorks.

This tutorial guides you step-by-step through the fundamental concepts of Continuous Integration using Hudson, Ant, and Subversion– when you’re done, you’ll understand the benefits of Continuous Integration as well as how to set up and properly configure Hudson, Ant, and Subversion to work together. The resulting build process will run both tests and software inspections and will report back violations almost as quickly as they occur.

Free CI and testing webinar

Friday, November 9th, 2007

Agitar’s Jeffrey Fredrick and myself will be hosting a free webinar on how to implement a continuous integration and testing process. Jeffrey is a key factor in the success of CruiseControl and is one of the principle figures behind CITCON (the other, of course, being Paul Julius); consequently, I’m humbled to have this opportunity. If you’re curious about CI or developer testing, then make it a point to join us for this event.

The webinar will take place on November 14th at 9am PST and registration is required. See you there!

Looked at Hudson lately?

Friday, October 5th, 2007

Over the last few months, I’ve become a fan of Hudson, an open source CI server that, in my opinion, is by far the easiest one on the market for configuring. What’s more, this CI server has a nice plug-in architecture that supports building in new features rather easily. In fact, a bit back I blogged about some challenges running Gant builds with Hudson and about a day later, there was a plug-in to handle it.

When I first started seriously evaluating Hudson, it seemed to only support CVS and Subversion. Recently, however, Hudson’s founder, Kohsuke Kawaguchi, reported that there are four additional systems supported (via the plug-in mechanism) including ClearCase, Perforce, and VSS.

What’s more, Hudson has a series of .NET plug-ins (like running NAnt, MSBuild, and even NUnit tests), making it an option for .NET developers looking to adopt CI.

If you haven’t taken a look at Hudson, you may want to– this CI server keeps getting better and better by the day.

Continuous Integration clambake, Boston style

Thursday, August 23rd, 2007

If you’re planning on attending this year’s SD Best Practices Conference & Expo in Boston, then be sure to pencil in that you’ll be busy on Friday September 21st from 1:45pm to 3:15pm listing to me jaw on about how great CI is and how it enables teams to more easily monitor software quality.

This is a fun discussion with live coding and a CI process demo– we’ll take a look at various CI servers and inspection tools for both .NET and the Java platform. I hope to see you there! Please don’t bring any clams though.

Managing JBoss with Cargo

Wednesday, July 11th, 2007

If you find yourself in need of a generic management tool that facilitates installing, starting, and stopping a container, plus the ability to deploy artifacts like war and ear files, then you may want to take a look at Cargo.

Briefly, Cargo is an innovative open source project that aims to automate container management in a generic fashion, such that the same API used to deploy a war file to JBoss can also start and stop Jetty. Cargo also can download and install a container automatically; and you can utilize Cargo’s API in a few different fashions, ranging from Java code to Ant tasks to Maven goals.

For example, if you’d like to create a repeatable deployment process that avoids environmental assumptions (like that the instance of the application server is properly configured, etc), you can use Cargo to automatically download and install a pre-defined kosher version, say of JBoss. Once JBoss has been installed and is started, you can then deploy artifacts and begin testing.

Using Ant to accomplish this process is actually quite simple. All you need are two jar files (at a minimum). If you are using the latest version of Cargo (at the time of this posting) then the two files are: cargo-core-uberjar-0.9.jar and cargo-ant-0.9.jar.

With these two files in your classpath, you can then create an Ant target that initializes Cargo’s task like so:

<taskdef resource="cargo.tasks">
 <classpath>
  <pathelement location="${libdir}/${cargo-jar}" />
  <pathelement location="${libdir}/${cargo-ant-jar}" />
 </classpath>
</taskdef>

Then you can download and install a container, plus start it as follows:

<cargo containerId="jboss4x" action="start" wait="false" id="${jboss.refid}">
 <zipurlinstaller installurl="${jboss.installer.url}" />
 <configuration type="standalone" home="${jboss.tmp.dir}">
 </configuration>
</cargo>

Note, you can deploy ear and war files between the two configuration tags. Also note, if JBoss is already installed, Cargo won’t attempt to reinstall.

Lastly, if you’d like to stop JBoss, then you can issue the following command:

<cargo containerId="jboss4x" action="stop" refid="${jboss.refid}" />

A refid is required to find a process as these steps are logically broken up. Also note that Cargo requires two different directories to properly install and configure JBoss– you can not use the same directory.

Cargo makes automated and reliable deployments a non event because this framework manages the container environment so you don’t have to. Give it a try and you’ll see a drastic increase in your ability to choreograph deployments quickly.

For more information on using Cargo for repeatable testing check out

JavaWorld CI book excerpt

Thursday, June 21st, 2007

JavaWorld has posted an excerpt of the CI book. If you can’t wait to get your hands on the hard copy (don’t worry, it’s only about a week away) then check out the advantages and disadvantages of CI and how CI complements other software development practices over on JavaWorld!