【问题标题】:Chef knife-spork Git plugin not committing or pushingChefknife-spork Git 插件未提交或推送
【发布时间】:2016-09-24 19:38:26
【问题描述】:

我在让刀叉的 Git 插件提交并推送到它的存储库时遇到问题。

这是knife spork info 的输出:

{"version_change_threshold"=>2,
"preserve_constraint_operators"=>true, 
"always_promote_remote"=>true, 
"skip_berkshelf"=>false, 
"role_match_file_name"=>true, 
"role_safe_delete"=>true, 
"json_options"=>{"indent"=>"  "}, 
"plugins"=>{
  "git"=>{
    "auto_push"=>true, 
    "remote"=>"origin", 
    "branch"=>"master" 
  }
}}

[...]
KnifeSpork::Plugins::Git: enabled
[...]

当我做knife spork bump COOKBOOK minor:

Git: Pulling latest changes from /path/to/chef-repo/cookbooks/COOKBOOK
Pulling latest changes from git submodules (if any)
Successfully bumped base to v0.2.0!
Git add'ing /path/to/chef-repo/cookbooks/COOKBOOK/metadata.rb

这只是添加它......然后我做knife spork upload COOKBOOK

Git: Pulling latest changes from /path/to/chef-repo/cookbooks/COOKBOOK
Pulling latest changes from git submodules (if any)
Freezing COOKBOOK at 0.2.0...
Successfully uploaded COOKBOOK@0.2.0!

将食谱上传到厨师服务器,但不提交回购或尝试推送......并且没有错误输出:/

【问题讨论】:

    标签: ruby chef-infra knife configuration-management spork


    【解决方案1】:

    好的,是的,我误解了流程......

    所以你必须先创建你的环境:

    knife spork environment create production
    knife spork environment create development
    

    一旦食谱准备好用于环境,你promote

    knife spork promote development COOKBOOK
    

    然后它提交并推送它

    【讨论】:

    • 如果您刚开始使用 Chef,我强烈建议您查看 Policy 工作流程而不是 Spork。它非常相似,但有一些专门构建的工作流工具。
    猜你喜欢
    • 2013-12-17
    • 2011-01-02
    • 2010-12-19
    • 2014-11-28
    • 2017-02-20
    • 2014-05-06
    • 2020-01-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多