We manually update the version number with every change to the cookbook. Then, we have a Jenkins job looking at each cookbook’s git repo and the build triggers on any change to the repo. In each job we run the following:
- clone repo
- bundle install
- foodcritic linting
- custom linting (that we haven’t yet migrated to foodcritic)
- kitchen destroy
- kitchen test
- grep the version number from the metadata file and store it in a variable
- using the version variable, check and see if there is an existing git tag with the same name, if not, git tag and git push, then upload the cookbook to the chef server via berks upload
The nice thing is that any fail along the way prevents an upload to the chef server.
It’s working out quite nicely for us.
On Aug 6, 2013, at 13:34, “Andrew Gross” <email@example.com:firstname.lastname@example.org> wrote:
Manually for now.
On Tue, Aug 6, 2013 at 4:26 PM, Anton Koldaev <email@example.com:firstname.lastname@example.org> wrote:
Are you doing it manually or using CI job?
On Tue, Aug 6, 2013 at 1:23 PM, Andrew Gross <email@example.com:firstname.lastname@example.org> wrote:
We do patch by default for now, freeze cookbooks in production, unfrozen in staging. (AKA you cant push to prod unless you have bumped the version).
On Tue, Aug 6, 2013 at 4:19 PM, Anton Koldaev <email@example.com:firstname.lastname@example.org> wrote:
Does anyone has such experience? Can you share it?
We’re already doing some syntax and foodcritic tests with Jenkins and looking forward to create auto-bump-and-upload job so it can do it on every git commit.
Thinking on doing ‘patch’ level version increment by default if there was no level bump in commit. Any better solutions? Any great tools to use(aka knife-spork)?