Our build process looked a little like this.
- Developer makes changes locally, commits to subversion
- Hudson detects changes, kicks off the compilation
- 3 Times a day, hudson would run the junit tests (about 25 minutes)
- 3 Times a day, hudson would run our xml api tests (about 10 minutes)
- 3 Times a day, hudson would run our Webtest tests
- Every two weeks or so, development would ask me to make a release build which would be published to our QA department.
My goal is to be able to turn around development changes in a much quicker fashion and get them into the hands of the qa group.
Enter hudson and build promotion. The idea here would be that for each checkin made by development, that subversion revision will go through a promotion process. Here is the process:
- Developer checks in code ->
- Hudson compiles code and builds our the ear ->
- Hudson zips up that project workspace and publishes it as an artifact for other jobs to consume
- The junit job is kicked off against the zipped workspace ->
- The api tests are kicked off against the zipped workspace ->
- The webtests are kicked off against the zipped workspace
- If all testsuites pass with zero errors, the build is "promoted" and is available for qa to test
- There may be several promoted builds per day/there may be 0.
- Install the build promotion plugin
- Configure your main compilation job use the build promotion plugin. You'll also need to add an ant target to zip the workspace and publish it as an artifact.
- In your child jobs, add a bootstrap target which downloads and explodes the zipped workspace. Remove any scm configurations from them.
- Finally, link your child jobs to the parent jobs via the promotion plugin configuration.
TODO:
- After things are promoted, they simply get a start next to them. I'm looking into the modifiying the promotion plugin so that it can perform more actions such as scping the artifacts to a webserver after they are promoted.
- I need to figure out a way to associate the sum of defects changed from 1 build to another and report them.