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.
|
Archive powered by MHonArc 2.6.16.