opscode/chef-dk — pull request #119 by danielsdeleo (2014-07-30 15:08:50+00:00)
Title: Upload Cookbooks Specified in Lockfile

Adds library classes and updates required to upload cookbooks from a policyfile lock. This enables full end-to-end use of Policyfile-based config deployment, including policyfile compilation, cookbook install from upstreams, publish to Chef Server, and chef-client run. As with previous Policyfile features, the upload feature isn't exposed in the CLI yet, so you have to write a small script to drive the library code. An example of this can be found here: https://github.com/danielsdeleo/policyfile-jenkins-demo

There are some open issues I plan to address in future pull requests:
* The code for reading the `Policyfile.lock.json` needs to be more defensive, since users will probably modify them by hand even though that's a terrible idea.
* Cookbooks may have been modified since the `Policyfile.lock.json` was computed. In some cases (particularly local development), we expect this to happen as part of an "edit, run chef or tests, repeat" development cycle, so that use case needs to work well.

This pull request depends on some changes in chef-client which can be reviewed here: https://github.com/opscode/chef/pull/1716 That pull request includes some incompatible changes to internal-ish APIs, so I think we should play it safe and merge only for 12.0. This implies that we're moving ChefDK's internal chef-client dep to 12.0, which should be fine, but we cannot load tools like `chefspec` into the same ruby VM instance until those tools update.

/cc @opscode/client-engineers