blog/ Continuous integration with git -- some thoughts

At work we use git, and have an extensive suite of tests for our code, and a set of scripts we use to kick them off manually. Unfortunately, we don't have a nice way to run them automatically.

Here's what I want, described here so I don't forget it. Tomorrow, I'll start looking for something that meets these needs, or can be hacked to do so. Maybe I'll have to implement it all, maybe not.

Here's the sort of workflow I'm looking for.

  1. Developer pushes something to git repository
  2. A post-receive hook pushes that commit on to a stack of commits to check for that tree.
  3. Build bot pops next testable sha1 from the stack
  4. Build bot checks out the code and runs a test script
  5. If the test script succeeds, logs that the SHA1 passed tests. Test results are pushed to a webserver for later viewing.
  6. If the test script fails, logs the failure. Test results get pushed. Developers get notified.
  7. After a failure, build bot uses git bisect to find a new commit between the last known good and the current. This becomes the next testable commit.

From that I get these requirements

For extra niceness, should have the ability to run the tests in a VM environment in snapshot mode, so tests are always run clean.