kitchen_hooks 1.7.13 → 1.7.14
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/etc/commit-release.json +8 -8
- data/etc/config.json +1 -1
- data/lib/kitchen_hooks/app.rb +2 -1
- data/lib/kitchen_hooks/helpers.rb +30 -0
- 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: d79c5b35992c0b702d82ca724450adf64d278543
|
4
|
+
data.tar.gz: ffd258c665a0e05c247c226131b3f86a55f7a16d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 189e45821445f040498ccce4f56a1d604fa1f3cc8e738ba7c2a025974c27f5a5181901148b0cf9fc117ab24350e6db37b950b6bfb9fcc69ae6fe2c14352f580c
|
7
|
+
data.tar.gz: b5d4cf3c1e4a9651f566f14e21529873ae641d097ccac9621fcfe3f482b6572fc0a882b466913b329356d302b882fdbb63d3a0c662dfc72a316e6de8c9f37ae3
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.7.
|
1
|
+
1.7.14
|
data/etc/commit-release.json
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
{
|
2
|
-
"before": "
|
3
|
-
"after": "
|
4
|
-
"ref": "refs/tags/v0.2.
|
2
|
+
"before": "fd4777414aeb61315d292936687d5a87e7d62ded",
|
3
|
+
"after": "fd4777414aeb61315d292936687d5a87e7d62ded",
|
4
|
+
"ref": "refs/tags/v0.2.6",
|
5
5
|
"user_id": 645,
|
6
6
|
"user_name": "Sean Clemmer",
|
7
7
|
"repository": {
|
8
|
-
"name": "
|
9
|
-
"url": "git@git.bluejeansnet.com:chef/
|
8
|
+
"name": "app_graphite",
|
9
|
+
"url": "git@git.bluejeansnet.com:chef/app_graphite.git",
|
10
10
|
"description": "",
|
11
|
-
"homepage": "http://git.bluejeansnet.com/chef/
|
11
|
+
"homepage": "http://git.bluejeansnet.com/chef/app_graphite"
|
12
12
|
},
|
13
13
|
"commits": [
|
14
14
|
{
|
15
|
-
"id": "
|
15
|
+
"id": "fd4777414aeb61315d292936687d5a87e7d62ded",
|
16
16
|
"message": "XYZ",
|
17
17
|
"timestamp": "2014-11-25T18:30:57-08:00",
|
18
|
-
"url": "http://git.bluejeansnet.com/chef/
|
18
|
+
"url": "http://git.bluejeansnet.com/chef/app_graphite/commit/fd4777414aeb61315d292936687d5a87e7d62ded",
|
19
19
|
"author": {
|
20
20
|
"name": "Sean Clemmer",
|
21
21
|
"email": "sclemmer@bluejeans.com"
|
data/etc/config.json
CHANGED
data/lib/kitchen_hooks/app.rb
CHANGED
@@ -46,6 +46,7 @@ module KitchenHooks
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def self.sync!
|
49
|
+
return if @@sync_interval.nil?
|
49
50
|
@@sync_worker = Thread.new do
|
50
51
|
loop do
|
51
52
|
process_sync
|
@@ -66,7 +67,7 @@ module KitchenHooks
|
|
66
67
|
@@knives = config['knives'].map do |_, knife|
|
67
68
|
Pathname.new(knife).expand_path.realpath.to_s
|
68
69
|
end
|
69
|
-
@@sync_interval = config
|
70
|
+
@@sync_interval = config['sync_interval']
|
70
71
|
end
|
71
72
|
|
72
73
|
get '/backlog' do
|
@@ -107,8 +107,14 @@ module KitchenHooks
|
|
107
107
|
end
|
108
108
|
|
109
109
|
berksfile = File::join clone, 'Berksfile'
|
110
|
+
berksfile_lock = "#{berksfile}.lock"
|
111
|
+
|
112
|
+
# If no lockfile provided, use latest dependencies
|
113
|
+
do_update = !File::exist?(berksfile_lock)
|
114
|
+
|
110
115
|
$stdout.puts 'Uploading dependencies'
|
111
116
|
berks_install berksfile
|
117
|
+
berks_update berksfile if do_update
|
112
118
|
knives.peach do |knife|
|
113
119
|
berks_upload berksfile, knife
|
114
120
|
end
|
@@ -164,6 +170,30 @@ module KitchenHooks
|
|
164
170
|
end
|
165
171
|
|
166
172
|
|
173
|
+
def self.berks_update berksfile
|
174
|
+
$stdout.puts 'started berks_update berksfile=%s' % berksfile.inspect
|
175
|
+
env_git_dir = ENV.delete 'GIT_DIR'
|
176
|
+
env_git_work_tree = ENV.delete 'GIT_WORK_TREE'
|
177
|
+
|
178
|
+
cmd = "berks update --debug --berksfile %s" % [
|
179
|
+
Shellwords::escape(berksfile)
|
180
|
+
]
|
181
|
+
begin
|
182
|
+
$stdout.puts "berks_update: %s" % cmd
|
183
|
+
system cmd
|
184
|
+
raise unless $?.exitstatus.zero?
|
185
|
+
rescue
|
186
|
+
raise 'Could not perform berks_update with config %s' % [
|
187
|
+
berksfile.inspect
|
188
|
+
]
|
189
|
+
end
|
190
|
+
|
191
|
+
ENV['GIT_DIR'] = env_git_dir
|
192
|
+
ENV['GIT_WORK_TREE'] = env_git_work_tree
|
193
|
+
$stdout.puts 'finished berks_update: %s' % berksfile
|
194
|
+
end
|
195
|
+
|
196
|
+
|
167
197
|
def self.berks_install berksfile
|
168
198
|
$stdout.puts 'started berks_install berksfile=%s' % berksfile.inspect
|
169
199
|
env_git_dir = ENV.delete 'GIT_DIR'
|