Continous delivery of an open source library

In the recent post I’ve dealt with a basic setup of git branching protecting an open source library author from a headache of not-so-production-ready master branch of a repository. Having two main branches setup (master & dev) one can think about introducing continuous delivery. How about automatic publishing any set of commits getting into production branch? TeamCity with its git support made it trivial.

The very first build configuration has been made for dev branch. The target branch was dev branch. It consists of only two steps:

  1. Build – done with MsBuild
  2. NUnit – running all the tests

The second was a bit longer, based on the master:

  1. Build – done with MsBuild
  2. NUnit – running all the tests
  3. NuGet pack – preparing a NuGet package with mixed NuSpec + csproj of the main library
  4. NUnit publish – pushing the prepared NuGet to the NuGet gallery.

As the master branch is considered as production ready, in my opinion, there’s nothing wrong with creating and uploading NuGet package for each set of commits, which goes through the tests. The very last case is versioning. For now (KISS), it’s based on the master branch build number preppended and appended with 0. This generates 0.1.0, 0.2.0, 0.3.0, etc.

Continuous delivery

I’ve just finished a Continuous delivery book. I must say, that my expectations were much higher than the level at which the topic was described. I do not say, that this is a bad book, but having a few well-grounded articles, like Fowler’s I simply do not find it good enough for a deep dive into the problem’s space. The last chapters present a way in which the whole book should have been written: simple cases with a short explanation dealing with the most common problems. From the other side, the very first chapters repeat like some kind of mantra the same sentences paraphrised over and over again (automate your build, do nothing manually, etc.).

If you’re a noob, and read nothing about this topic, that’s a very good choice. For the others: it is not a must-have.