kitchen_hooks 1.7.18 → 1.7.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 472d46fc5fb8843093e2a48f636544675cb0ed40
4
- data.tar.gz: 2f8efd36c2383c9fb8ed4d6225134ce6cb4387b4
3
+ metadata.gz: 90cf6269ccff702ef06f59870579a1aa1352281c
4
+ data.tar.gz: c340a7e6d74b942edbf388681a6ece6b90d06de0
5
5
  SHA512:
6
- metadata.gz: 4bc693ee14e9feb5a2447f1bd039975395196c0123bdd555387d8272a759996c83905ef060e76501ff6f912ca88dc7efbad4bb8b20764d8421d2ad806134a2df
7
- data.tar.gz: ea6fa9651d53110cd3c32d6d5c0a465f5c163166451be663fac84ddce315c88d0136ed1566b2290e9d15fcba37093c3405fbf0d46273f5845522ffe1b0e61466
6
+ metadata.gz: 821019eed8e3fd76fe6f4c34e100306cde5e51e332edf58d3ef777b798729db3aeef8ef3dd14df58eaf835475b7e23948f257635e6acf3e9fce636e1155025a7
7
+ data.tar.gz: 97e4690b0424e8c7d3277c06fef0bffe06d790d15189d02d2fc196fe9e493ea0cce67d797b9c033385c2fe9b01be64825766eab75a1c0f01b7049f4b8102d0fc
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.7.18
1
+ 1.7.19
@@ -145,9 +145,13 @@ module KitchenHooks
145
145
  db[Time.now.to_f] = entry
146
146
  end
147
147
  db.flush
148
+ $stderr.puts '*********************************************'
149
+ $stderr.puts '#############################################'
148
150
  $stderr.puts 'MARK "%s": event=%s error=%s' % [
149
151
  type, event.inspect, error.inspect
150
152
  ]
153
+ $stderr.puts '#############################################'
154
+ $stderr.puts '*********************************************'
151
155
  notify entry
152
156
  end
153
157
 
@@ -107,13 +107,14 @@ module KitchenHooks
107
107
  end
108
108
 
109
109
  berksfile = File::join clone, 'Berksfile'
110
- berksfile_lock = "#{berksfile}.lock"
110
+ # berksfile_lock = "#{berksfile}.lock"
111
111
 
112
- $stdout.puts 'Uploading dependencies'
113
- FileUtils.rm_rf File.join(ENV['HOME'], '.berkshelf')
114
- berks_install berksfile
115
- knives.peach do |knife|
116
- berks_upload berksfile, knife
112
+ if File.exist? berksfile
113
+ $stdout.puts 'Uploading dependencies'
114
+ berks_install berksfile
115
+ knives.peach do |knife|
116
+ berks_upload berksfile, knife
117
+ end
117
118
  end
118
119
 
119
120
  Dir.chdir clone do
@@ -132,16 +133,22 @@ module KitchenHooks
132
133
 
133
134
 
134
135
  def self.kitchen_upload knives
135
- $stdout.puts 'Uploading data_bags'
136
- with_each_knife_do 'upload data_bags --chef-repo-path .', knives
136
+ if Dir.exist? 'data_bags'
137
+ $stdout.puts 'Uploading data_bags'
138
+ with_each_knife_do 'upload data_bags --chef-repo-path .', knives
139
+ end
137
140
 
138
- $stdout.puts 'Uploading roles'
139
- with_each_knife_do 'upload roles --chef-repo-path .', knives
141
+ if Dir.exist? 'roles'
142
+ $stdout.puts 'Uploading roles'
143
+ with_each_knife_do 'upload roles --chef-repo-path .', knives
144
+ end
140
145
 
141
- $stdout.puts 'Uploading environments'
142
- Dir['environments/*'].peach do |e|
143
- knives.peach do |k|
144
- upload_environment e, k
146
+ if Dir.exist? 'environments'
147
+ $stdout.puts 'Uploading environments'
148
+ Dir['environments/*'].peach do |e|
149
+ knives.peach do |k|
150
+ upload_environment e, k
151
+ end
145
152
  end
146
153
  end
147
154
  end
@@ -168,34 +175,6 @@ module KitchenHooks
168
175
  end
169
176
 
170
177
 
171
- def self.berks_update berksfile, knife=nil
172
- $stdout.puts 'started berks_update berksfile=%s' % berksfile.inspect
173
- env_git_dir = ENV.delete 'GIT_DIR'
174
- env_git_work_tree = ENV.delete 'GIT_WORK_TREE'
175
-
176
- knife_args = if knife
177
- '--config %s' % Shellwords::escape(berkshelf_config knife)
178
- end
179
-
180
- cmd = "berks update --debug --berksfile %s %s" % [
181
- Shellwords::escape(berksfile), knife_args
182
- ]
183
- begin
184
- $stdout.puts "berks_update: %s" % cmd
185
- system cmd
186
- raise unless $?.exitstatus.zero?
187
- rescue
188
- raise 'Could not perform berks_update with config %s' % [
189
- berksfile.inspect
190
- ]
191
- end
192
-
193
- ENV['GIT_DIR'] = env_git_dir
194
- ENV['GIT_WORK_TREE'] = env_git_work_tree
195
- $stdout.puts 'finished berks_update: %s' % berksfile
196
- end
197
-
198
-
199
178
  def self.berks_install berksfile, knife=nil
200
179
  $stdout.puts 'started berks_install berksfile=%s' % berksfile.inspect
201
180
  env_git_dir = ENV.delete 'GIT_DIR'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen_hooks
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.18
4
+ version: 1.7.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Clemmer