A thin wrapper around Test Kitchen allowing you to define dependencies for your suites
Assuming you have a
.kitchen.yml which looks like the following
--- driver: name: vagrant provisioner: name: chef_zero platforms: - name: ubuntu-14.04 - name: centos-7.1 suites: - name: db run_list: attributes: - name: app run_list: attributes: - name: web run_list: attributes:
In the root directory of your cookbook, along side your
.kitchen.yml add a
instance 'web-ubuntu-1404' do depends 'app-ubuntu-1404' end instance 'app-ubuntu-1404' do depends 'db-ubuntu-1404' end
This tells Cochina that the
web suite depends on the
app suite, and that the
app suite depends on the
db suite. Now, when you run
it will first converge
db-ubuntu-1404, followed by
By default the target instance is sent the
:verify action, and each dependency
is sent the
After all instances have finished running, each instance is destroyed.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install cocina
To install this gem onto your local machine, run
bundle exec rake install. To release a new version, update the version number in
version.rb, and then run
bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the
.gem file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/brandocorp/cocina.
The gem is available as open source under the terms of the MIT License.