I’m currently working with the Go CI system from Thoughtworks. One of the things I really like about it is the way that you can have a build “pipeline”. What this means is that you can have a build job which is broken down into, let’s say, 3 different steps:
- Checkout and build code, and run unit tests
- Package and deploy to a test server
- Run acceptance test suite
The way they’ve set this up is pretty decent, it means that every check-in build can be setup to do all of those steps. But you don’t want to wait an hour just to get some feedback on your commit, so Go handles this by giving feedback at the end of each step, rather than having to wait to the end of the whole job.
In the past, when I’ve used Bamboo or Hudson, I’ve setup separate jobs for the check-in builds (which mainly just run unit tests and some light static analysis) and the nightly builds (which do the same, but also include much more static analysis as well as run automated functional tests).
However, it is possible to mimic the Go behaviour using Hudson/Jenkins or Bamboo. These all support the practice of dependent builds. Hudson jobs have a “Build after other projects are built” option for example. So, to recreate what Go does, you can create separate jobs/plans which run in series. For example:
Job 1: Checks out code, compiles and runs unit tests.
Job 2: Runs coverage report and other static analysis tools such as CPD, PMD and FindBugs
Job 3: Packages up distributable, deploys it and initiates automated tests (e.g. using Selenium)
The developers will get their compile & unit test feedback as quickly as usual, but the process of running a much more exhaustive system will have been spawned as well. No need to wait for the results of the nightly builds to get the full build reports 🙂