如何使用总是最新的食谱而其他一些与Berkshelf保持联系

时间:2014-10-31 06:42:59

标签: chef berkshelf

我有Berksfile这样:

source "https://api.berkshelf.com"

cookbook 'ruby_build'
cookbook 'rbenv', github: 'fnichol/chef-rbenv'
cookbook 'foo', git: 'git@bitbucket.org:ironsand/cookbook-foo.git'

knife solo cook node之后,创建Berksfile.lock并锁定烹饪书的版本。

我想将最新的食谱用于自己的食谱(foo),并锁定其他人(rbenvruby_build)创建的食谱版本。

我无法理解如何做到这一点。有谁知道我能做到吗?

1 个答案:

答案 0 :(得分:2)

您可以在Berksfile中指定您的食谱版本。或者,如果您正在为您提供git repo的烹饪书,您可以指定要提取的修订版。

source "https://api.berkshelf.com"

cookbook 'ruby_build', '= 4.0.2'
cookbook 'rbenv', github: 'fnichol/chef-rbenv', tag: 'some_Tag'
cookbook 'foo', git: 'git@bitbucket.org:ironsand/cookbook-foo.git', :branch 'master'

如果您想要特定的哈希而不是标签或分支,也可以使用:ref 'some_git_hash_for_ref'