Cookbook versions across multiple environments


I am trying to figure out the best method for running continuous integration
across multiple environments .

chef layout

each of our environments have cookbook versions assigned to the environment

cookbook version 1.1
cookbook version 1.2
cookbook version 1.3

I need to be able to update test environment cookbooks off of trunk and then
update the cookbooks from test to prod , the only way I can see this working
right now is to set up a post commit hook for cookbooks to auto update default
cookbooks versions which the test env references, then once test is complete
manually roll the versions of the cookbooks to the same versions of prod and
update the cookbooks again with the same data just containing the prod
versions. I have a lot of cookbooks and a lot of environments this does not
seem like the easiest way of accomplishing this task.