Browse Source

Merge pull request #25 from devops-israel/master

COOK-2597: allow changing git shallow_clone value
Joshua Timberman 6 years ago
parent
commit
aa0f9da3e2
2 changed files with 2 additions and 1 deletions
  1. 1 1
      providers/default.rb
  2. 1 0
      resources/default.rb

+ 1 - 1
providers/default.rb

@@ -129,7 +129,7 @@ def run_deploy(force = false)
     group new_resource.group
     deploy_to new_resource.path
     ssh_wrapper "#{new_resource.path}/deploy-ssh-wrapper" if new_resource.deploy_key
-    shallow_clone true
+    shallow_clone new_resource.shallow_clone
     rollback_on_error new_resource.rollback_on_error
     all_environments = ([new_resource.environment]+new_resource.sub_resources.map{|res| res.environment}).inject({}){|acc, val| acc.merge(val)}
     environment all_environments

+ 1 - 0
resources/default.rb

@@ -42,6 +42,7 @@ attribute :repository, :kind_of => String
 attribute :enable_submodules, :kind_of => [TrueClass, FalseClass], :default => false
 attribute :environment, :kind_of => Hash, :default => {}
 attribute :deploy_key, :kind_of => [String, NilClass], :default => nil
+attribute :shallow_clone, :kind_of => [TrueClass, FalseClass], :default => true
 attribute :force, :kind_of => [TrueClass, FalseClass], :default => false
 attribute :rollback_on_error, :kind_of => [TrueClass, FalseClass], :default => true
 attribute :purge_before_symlink, :kind_of => Array, :default => []