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 +4 -4
- data/VERSION +1 -1
- data/lib/kitchen_hooks/app.rb +4 -0
- data/lib/kitchen_hooks/helpers.rb +21 -42
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90cf6269ccff702ef06f59870579a1aa1352281c
|
4
|
+
data.tar.gz: c340a7e6d74b942edbf388681a6ece6b90d06de0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 821019eed8e3fd76fe6f4c34e100306cde5e51e332edf58d3ef777b798729db3aeef8ef3dd14df58eaf835475b7e23948f257635e6acf3e9fce636e1155025a7
|
7
|
+
data.tar.gz: 97e4690b0424e8c7d3277c06fef0bffe06d790d15189d02d2fc196fe9e493ea0cce67d797b9c033385c2fe9b01be64825766eab75a1c0f01b7049f4b8102d0fc
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.7.
|
1
|
+
1.7.19
|
data/lib/kitchen_hooks/app.rb
CHANGED
@@ -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
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
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
|
-
|
136
|
-
|
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
|
-
|
139
|
-
|
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
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
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'
|