docker_toolkit 0.1.17 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/bin/waiter.rb +8 -1
- data/lib/docker_toolkit/version.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: 2e506b5bda30e8b2af3f83b98321384feb54f23008546802c67fc20fecdb19cb
|
4
|
+
data.tar.gz: 13628761544fbccbb6fc59ef47ba8e06730f2020913dd341cf380d52c59bbdee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fadbd3a24e4280cf5c347574dd711b85f4701a2a6c687caf9310b6039890488b7b6e2fed065e0ee18b972c8c3358930b3e6006b72ba71b86ec573a7578a7900a
|
7
|
+
data.tar.gz: '09b7f73b9f6842b5e3b57532f732c75a71e22d18e05ee33f23ae5338102ca7a077b0eb95dcc9498c0534e7ca4ec1652c75ba6a00b7019910e282788204f5b2d2'
|
data/README.md
CHANGED
@@ -27,7 +27,8 @@ Usage: waiter.rb [options] -- exec
|
|
27
27
|
HTTP addres to connect to consul
|
28
28
|
--consul Wait for local consul agent to be ready
|
29
29
|
--consul-service service Wait for service appear in consul
|
30
|
-
--consul-service-count count
|
30
|
+
--consul-service-count count Wait for this count services appear in consul
|
31
|
+
--consul-tag tag User tag to filter services in consul
|
31
32
|
--user user username
|
32
33
|
--pass pass password
|
33
34
|
-t, --timeout secs=15 Total timeout
|
data/bin/waiter.rb
CHANGED
@@ -5,6 +5,7 @@ require 'securerandom'
|
|
5
5
|
require 'English'
|
6
6
|
require 'openssl'
|
7
7
|
require 'tempfile'
|
8
|
+
require 'json'
|
8
9
|
|
9
10
|
STDOUT.sync = true
|
10
11
|
STDERR.sync = true
|
@@ -63,6 +64,10 @@ OptionParser.new do |o|
|
|
63
64
|
@opts[:consul_service_count] = count.to_i
|
64
65
|
end
|
65
66
|
|
67
|
+
o.on("--consul-tag tag", 'Filter consul service by tag') do |tag|
|
68
|
+
@opts[:consul_tag] = tag.to_s
|
69
|
+
end
|
70
|
+
|
66
71
|
o.on('--user user', 'username') do |user|
|
67
72
|
@opts[:user] = user.strip
|
68
73
|
end
|
@@ -149,7 +154,9 @@ def wait_for_consul_service(service)
|
|
149
154
|
log("Waiting for consul service #{service}...")
|
150
155
|
ret = wait_for @opts[:timeout] do
|
151
156
|
cmd = "curl -s #{@opts[:consul_addr]}/v1/health/service/#{service}?passing"
|
152
|
-
|
157
|
+
cmd += "&tag=#{@opts[:consul_tag]}" if @opts[:consul_tag]
|
158
|
+
result = `#{cmd}`
|
159
|
+
result = JSON.parse(result) rescue []
|
153
160
|
result.count >= @opts[:consul_service_count]
|
154
161
|
end
|
155
162
|
|
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.18
|
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-08-
|
12
|
+
date: 2018-08-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: diplomat
|