Here at Opscode, we release a lot of cookbooks to the Chef Community site. Each individual cookbook is a separate software development project: they all have a git repository, a released “artifact” version, and as we extend cookbooks for test kitchen, tests.
We follow particular process for releasing new versions. Assuming first that the cookbook’s changes have been tested, we do the following:
- Update the version in the metadata.rb.
- Update the CHANGELOG.md with the changes.
- Create a commit for release, and git tag the repository.
- Release the new version on the community site.
- Push the git commit and tags to the GitHub repository.
- Update the metadata version to the next odd-numbered “patch” release for development (e.g., 1.0.2 -> 1.0.3).
- Commit the “development version” and push to GitHub.
With over 130 cookbooks maintained by Opscode, that can be a lot of repetition when we do a number of releases. This is even worse as I maintain 35 of my own cookbooks.
I lamented about not having a knife plugin to automate the process on twitter after releasing a cookbook where I forgot to push the commit with the metadata.rb change, and Mike Fiedler offered to write such a plugin. I drafted some thoughts, and today he released a RubyGem for a new knife-community plugin. After using this for a couple releases today, I can confirm it is totally awesome.
The plugin is hosted on GitHub.
Mike is working to implement additional features, including the “increment for development” steps (#6 and #7 above), and add more spec and integration tests. If you’d like to help out, you can contact him:
- miketheman on #chef or #chef-hacking at irc.freenode.net