docker_toolkit 0.1.20 → 0.1.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/bin/waiter.rb +6 -2
- data/lib/docker_toolkit/runner.rb +6 -1
- data/lib/docker_toolkit/version.rb +1 -1
- data/lib/docker_toolkit/watcher.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f203e1bb70de96bcdfdcb341bc0e4eb3466a2a2a8aa6ebc00653c9e26427674f
|
4
|
+
data.tar.gz: cbd053c7089875d83694327eea6bf0f7c19e6cb2912777fd6c7156f0bcf7d44f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64d05ccf038c5f4ed63de2c09071632065399f23f34bf3a6ad13d7ff7a877ee00d7c879596df4819a81676e910beb827fd9a4709f658d74c07f81825540cdce8
|
7
|
+
data.tar.gz: 38aac6414f3106ec403f8570314774c2de7d0b548400f9c6eb4d3ee53b382675253e1aa6788ec814ac63eb3283aabebac5974fd96effc70bf323c1c460dc3693
|
data/Gemfile.lock
CHANGED
data/bin/waiter.rb
CHANGED
@@ -64,7 +64,7 @@ OptionParser.new do |o|
|
|
64
64
|
@opts[:consul_service_count] = count.to_i
|
65
65
|
end
|
66
66
|
|
67
|
-
o.on(
|
67
|
+
o.on('--consul-tag tag', 'Filter consul service by tag') do |tag|
|
68
68
|
@opts[:consul_tag] = tag.to_s
|
69
69
|
end
|
70
70
|
|
@@ -156,7 +156,11 @@ def wait_for_consul_service(service)
|
|
156
156
|
cmd = "curl -s #{@opts[:consul_addr]}/v1/health/service/#{service}?passing"
|
157
157
|
cmd += "&tag=#{@opts[:consul_tag]}" if @opts[:consul_tag]
|
158
158
|
result = `#{cmd}`
|
159
|
-
result =
|
159
|
+
result = begin
|
160
|
+
JSON.parse(result)
|
161
|
+
rescue StandardError
|
162
|
+
[]
|
163
|
+
end
|
160
164
|
result.count >= @opts[:consul_service_count]
|
161
165
|
end
|
162
166
|
|
@@ -6,7 +6,7 @@ module DockerToolkit
|
|
6
6
|
|
7
7
|
module Runner
|
8
8
|
|
9
|
-
def init_service
|
9
|
+
def init_service(service)
|
10
10
|
STDOUT.sync = true
|
11
11
|
STDERR.sync = true
|
12
12
|
|
@@ -34,6 +34,11 @@ module DockerToolkit
|
|
34
34
|
envs
|
35
35
|
end
|
36
36
|
|
37
|
+
def load_envs_from_consul(consul, service)
|
38
|
+
envs = execute!("consul.rb --consul=http://#{consul}:8500 --env services/env/#{service} --pristine -d", "Can't load envs")
|
39
|
+
load_envs(envs)
|
40
|
+
end
|
41
|
+
|
37
42
|
def execute(cmd)
|
38
43
|
puts "Executing: #{cmd}"
|
39
44
|
output = `#{cmd}`
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docker_toolkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Godko Ivan
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-09-
|
12
|
+
date: 2018-09-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: diplomat
|