aggkit 0.4.5.12300 → 0.4.5.12301
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/aggexec +16 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26fa6bda6378df5c2c899118bb2fd76f9ff438f7
|
4
|
+
data.tar.gz: 82693d68d13a5c23d975d07f8447081bce11cb5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df631a0eb56307cdc0d1bdc9e2c040764d6e66ed2327c5bf348f4d076e55ea599bc0f9fc4e0b8e145a365a35c49ddb708bd262b62ae3f223b4ac97780c53955d
|
7
|
+
data.tar.gz: ab2220b1f2cd779dad19b32117bd1617ac62af8bf1925dbe28cb684f9bce8cad61fb8d97e3c1b4350f6037304304b2f39201612a23fa8c150416967268514c2f
|
data/README.md
CHANGED
@@ -24,7 +24,8 @@ Usage: aggexec [options] -- exec
|
|
24
24
|
--depends=mq,db,router... Set list of services to wait for ready before start
|
25
25
|
--prefix=kv/folder/path Consul KV prefix to load envs from. Multiple prefixes are merged from left to right.
|
26
26
|
--service=<SERVICE> Showrtcut for --prefix=services/env/<SERVICE>. Multiple prefixes are merged from left to right.
|
27
|
-
--templates=<FOLDER> Folder for recursive
|
27
|
+
--templates=<FOLDER> Folder for recursive envsubst *.in templates. Multiple prefixes are merged from left to right.
|
28
|
+
--no-exec skip exec command at the end
|
28
29
|
```
|
29
30
|
|
30
31
|
|
data/bin/aggexec
CHANGED
@@ -42,10 +42,13 @@ parser = Aggkit::OptionParser.new do |o|
|
|
42
42
|
@opts[:prefixes] << "services/env/#{service}".strip
|
43
43
|
end
|
44
44
|
|
45
|
-
o.on('--templates=<FOLDER>', 'Folder for recursive
|
45
|
+
o.on('--templates=<FOLDER>', 'Folder for recursive envsubst *.in templates. Multiple prefixes are merged from left to right.') do |folder|
|
46
46
|
@opts[:templates] << folder.strip
|
47
47
|
end
|
48
48
|
|
49
|
+
o.on('--no-exec', 'skip exec command at the end') do
|
50
|
+
@opts[:noexec] = true
|
51
|
+
end
|
49
52
|
end
|
50
53
|
parser.parse!
|
51
54
|
|
@@ -53,19 +56,23 @@ parser.parse!
|
|
53
56
|
@opts[:prefixes] = @opts[:prefixes].reject(&:empty?)
|
54
57
|
@opts[:templates] = @opts[:templates].reject(&:empty?)
|
55
58
|
|
56
|
-
|
59
|
+
if @opts[:exec].empty? && !@opts[:noexec]
|
60
|
+
Aggkit::Exec.die 'exec script must be provided'
|
61
|
+
end
|
57
62
|
|
58
|
-
|
59
|
-
|
63
|
+
if @opts[:depends].any? || @opts[:prefixes].any?
|
64
|
+
# Wait for consul
|
65
|
+
Aggkit::Consul.wait_for_consul(@opts[:consul])
|
60
66
|
|
61
|
-
# Wait for dependencies
|
62
|
-
@opts[:depends].each(&Aggkit::Consul.method(:wait_for_service).curry.call(@opts[:consul]))
|
67
|
+
# Wait for dependencies
|
68
|
+
@opts[:depends].each(&Aggkit::Consul.method(:wait_for_service).curry.call(@opts[:consul]))
|
63
69
|
|
64
|
-
# Load env from consul
|
65
|
-
@opts[:prefixes].each(&Aggkit::Consul.method(:load_envs_from_consul).curry.call(@opts[:consul]))
|
70
|
+
# Load env from consul
|
71
|
+
@opts[:prefixes].each(&Aggkit::Consul.method(:load_envs_from_consul).curry.call(@opts[:consul]))
|
72
|
+
end
|
66
73
|
|
67
74
|
# Preprocess template files
|
68
75
|
Aggkit::Consul.envsubst(*@opts[:templates])
|
69
76
|
|
70
|
-
exec(*@opts[:exec])
|
77
|
+
exec(*@opts[:exec]) unless @opts[:noexec]
|
71
78
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aggkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.5.
|
4
|
+
version: 0.4.5.12301
|
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: 2019-06-
|
12
|
+
date: 2019-06-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: diplomat
|