Berkshelf use case

Greetings!

I’m trying to improve my cookbook developing process.
For this purpose i saw that almost everyone uses berkshelf.
I read about it a lot but i can’t draw a good use case =(

As i understood every cookbook exists in its separate repository.In their
metadata.rb file written it’s version and dependent cookbook version if any.
If we use tags we can handle versioning easily.

Chef repository contains only : environments, roles, data_bags and Berksfile
where all cookbooks are listed.

So here confusion begins :
How do i execute build on CI after push correctly, and execute tests,then if
they pass cookbook should be uploaded into chef-server? Because it’s wrong to
configure jobs per cookbook.

Anyone can share his use case? How cookbooks developing process designed?
What cycle it has? How change in cookbooks triggers tests and upload to
chef-server on CI?And the most important how you use environments to map
cookbook versions to it(not how to do it, but actually how your infrastructure
looks like with them)?
Any help will be appreciated.

Thank You.