Upload specific Chef cookbook version with knife

chefknife

Is it possible to upload an exact version of a Chef cookbook via knife? All I've seen is that knife will upload the latest version it can find.

Is it possible to upload a specific version? Downloading examples show:

$ knife cookbook download COOKBOOK_NAME [COOKBOOK_VERSION] (options)

Is there a way to do this with the upload command?

Best Answer

Knife upload te version of code you have on your disk, on the corresponding cookbook-dir inside your cookbooks path, that is configured on your knife.rb

That being said, if you use tags on your cookbooks, you can use git to do checkouts and switch to the desired version. Then invoke the:

knife upload COOKBOOK_NAME
Related Topic