capistrano-docker_cluster 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGE_LOG.md +4 -0
- data/lib/capistrano/docker_cluster/scripts.rb +28 -5
- data/lib/capistrano/docker_cluster/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: bccf2aa54a04da36575a34851e9b815d15f449affbe16a74c00231c60775d50a
|
4
|
+
data.tar.gz: d2f8d8499821e616b4b1b58a5e77ce707f9c3b8d3379284faa66af3ffeedcd4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac43c04fa0abb4f41fefcc3f78838c7a54e81ef8a7c43ae7181f68c8d2de5726850aba26d203952dbf5670007fcfb40f98d755a652c5f61485102e7982d99e55
|
7
|
+
data.tar.gz: 0b8395d794c1ceae2219c055af592d911e61d3e9d3490dd9e8821170e8c1feec45f8d100e97d158b14b57f52c8b2045c913ce1b75905948e8bba0c7eb38bb4f0
|
data/CHANGE_LOG.md
CHANGED
@@ -14,14 +14,17 @@ module Capistrano
|
|
14
14
|
# the predefined configuration by calling `bin/start app`.
|
15
15
|
def start_script(host)
|
16
16
|
apps = Array(fetch_for_host(host, :docker_apps))
|
17
|
-
cmd = "
|
17
|
+
cmd = "bin/docker-cluster"
|
18
18
|
image_id = "#{fetch(:docker_repository)}:#{fetch(:docker_tag)}"
|
19
19
|
prefix = fetch(:docker_prefix)
|
20
20
|
|
21
21
|
cases = []
|
22
|
+
all = []
|
22
23
|
apps.each do |app|
|
23
24
|
args = app_host_args(app, host)
|
24
|
-
|
25
|
+
start_cmd = "#{cmd} #{args.join(' ')} --name '#{prefix}#{app}' --image '#{image_id}' \"$@\""
|
26
|
+
cases << " '#{app}')\n exec #{start_cmd}\n ;;"
|
27
|
+
all << " #{start_cmd}"
|
25
28
|
end
|
26
29
|
|
27
30
|
<<~BASH
|
@@ -35,12 +38,19 @@ module Capistrano
|
|
35
38
|
cd $(dirname $0)/..
|
36
39
|
|
37
40
|
typeset app=$1
|
41
|
+
if [ "$app" == "" ]; then
|
42
|
+
>&2 echo "Usage: $0 #{apps.join('|')}|--all"
|
43
|
+
exit 1
|
44
|
+
fi
|
38
45
|
shift
|
39
46
|
|
40
47
|
case $app in
|
41
48
|
#{cases.join("\n")}
|
49
|
+
'--all')
|
50
|
+
#{all.join("\n")}
|
51
|
+
;;
|
42
52
|
*)
|
43
|
-
>&2 echo "Usage: $0 #{apps.join('|')}"
|
53
|
+
>&2 echo "Usage: $0 #{apps.join('|')}|--all"
|
44
54
|
exit 1
|
45
55
|
esac
|
46
56
|
BASH
|
@@ -78,6 +88,10 @@ module Capistrano
|
|
78
88
|
cd $(dirname $0)/..
|
79
89
|
|
80
90
|
typeset app=$1
|
91
|
+
if [ "$app" == "" ]; then
|
92
|
+
>&2 echo "Usage: $0 #{apps.join('|')}"
|
93
|
+
exit 1
|
94
|
+
fi
|
81
95
|
shift
|
82
96
|
|
83
97
|
case $app in
|
@@ -97,7 +111,9 @@ module Capistrano
|
|
97
111
|
cases = []
|
98
112
|
all = []
|
99
113
|
apps.each do |app|
|
100
|
-
|
114
|
+
stop_cmd = "bin/docker-cluster --name '#{prefix}#{app}' --count 0"
|
115
|
+
cases << " '#{app}')\n exec #{stop_cmd}\n ;;"
|
116
|
+
all << " #{stop_cmd}"
|
101
117
|
end
|
102
118
|
|
103
119
|
<<~BASH
|
@@ -111,11 +127,18 @@ module Capistrano
|
|
111
127
|
cd $(dirname $0)/..
|
112
128
|
|
113
129
|
typeset app=$1
|
130
|
+
if [ "$app" == "" ]; then
|
131
|
+
>&2 echo "Usage: $0 #{apps.join('|')}|--all"
|
132
|
+
exit 1
|
133
|
+
fi
|
114
134
|
|
115
135
|
case $app in
|
116
136
|
#{cases.join("\n")}
|
137
|
+
'--all')
|
138
|
+
#{all.join("\n")}
|
139
|
+
;;
|
117
140
|
*)
|
118
|
-
>&2 echo "Usage: $0 #{apps.join('|')}"
|
141
|
+
>&2 echo "Usage: $0 #{apps.join('|')}|--all"
|
119
142
|
exit 1
|
120
143
|
esac
|
121
144
|
BASH
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-docker_cluster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Durand
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|