indocker 0.3.7 → 0.3.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +18 -18
- data/lib/indocker/container_deployer.rb +3 -5
- data/lib/indocker/deploy_context.rb +4 -2
- data/lib/indocker/docker.rb +2 -1
- data/lib/indocker/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: 94c3e1673cb76f0e0684e0d88286d7e9797e0d5095cc8d1da23c43c729c80df4
|
4
|
+
data.tar.gz: c2ee0ea5f6e461fb3efeeeb5b3f9415e701c7bffcadc754fae8356a88dcdd7ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea87d5271a5bce0ff19bb28145ac31e6ab681278e008e43ebbba057fd8325bd358f02b83b46b1ba762653cbb6ed1b6565ce4e7ef72961149270fea3073e5d960
|
7
|
+
data.tar.gz: 2a18463fbb82df02122ec3b842f3a186dd08d50a946b5f999850c7f677ee305292a09cd9e95f54d1ca51ccaed21ac69edd25f56c3b5dde9f9de2a10d599b5319
|
data/Gemfile.lock
CHANGED
@@ -1,38 +1,38 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
indocker (0.3.
|
4
|
+
indocker (0.3.9)
|
5
5
|
net-ssh
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
10
|
coderay (1.1.3)
|
11
|
-
diff-lcs (1.5.
|
12
|
-
docile (1.4.
|
13
|
-
method_source (1.
|
14
|
-
net-ssh (7.
|
15
|
-
pry (0.
|
11
|
+
diff-lcs (1.5.1)
|
12
|
+
docile (1.4.1)
|
13
|
+
method_source (1.1.0)
|
14
|
+
net-ssh (7.3.0)
|
15
|
+
pry (0.15.0)
|
16
16
|
coderay (~> 1.1)
|
17
17
|
method_source (~> 1.0)
|
18
18
|
rake (12.3.3)
|
19
|
-
rspec (3.
|
20
|
-
rspec-core (~> 3.
|
21
|
-
rspec-expectations (~> 3.
|
22
|
-
rspec-mocks (~> 3.
|
23
|
-
rspec-core (3.
|
24
|
-
rspec-support (~> 3.
|
25
|
-
rspec-expectations (3.
|
19
|
+
rspec (3.13.0)
|
20
|
+
rspec-core (~> 3.13.0)
|
21
|
+
rspec-expectations (~> 3.13.0)
|
22
|
+
rspec-mocks (~> 3.13.0)
|
23
|
+
rspec-core (3.13.2)
|
24
|
+
rspec-support (~> 3.13.0)
|
25
|
+
rspec-expectations (3.13.3)
|
26
26
|
diff-lcs (>= 1.2.0, < 2.0)
|
27
|
-
rspec-support (~> 3.
|
28
|
-
rspec-mocks (3.
|
27
|
+
rspec-support (~> 3.13.0)
|
28
|
+
rspec-mocks (3.13.2)
|
29
29
|
diff-lcs (>= 1.2.0, < 2.0)
|
30
|
-
rspec-support (~> 3.
|
31
|
-
rspec-support (3.
|
30
|
+
rspec-support (~> 3.13.0)
|
31
|
+
rspec-support (3.13.2)
|
32
32
|
simplecov (0.18.5)
|
33
33
|
docile (~> 1.1)
|
34
34
|
simplecov-html (~> 0.11)
|
35
|
-
simplecov-html (0.
|
35
|
+
simplecov-html (0.13.1)
|
36
36
|
|
37
37
|
PLATFORMS
|
38
38
|
x86_64-linux
|
@@ -26,9 +26,7 @@ class Indocker::ContainerDeployer
|
|
26
26
|
end
|
27
27
|
else
|
28
28
|
Proc.new do |&block|
|
29
|
-
|
30
|
-
block.call
|
31
|
-
end
|
29
|
+
block.call
|
32
30
|
end
|
33
31
|
end
|
34
32
|
|
@@ -44,9 +42,9 @@ class Indocker::ContainerDeployer
|
|
44
42
|
)
|
45
43
|
|
46
44
|
if result.exit_code != 0
|
47
|
-
exit 1
|
45
|
+
exit 1
|
48
46
|
end
|
49
|
-
|
47
|
+
|
50
48
|
@logger.info("Container deployment to #{server.user}@#{server.host} finished: #{container.name.to_s.green}")
|
51
49
|
|
52
50
|
deploy_server.close_session
|
@@ -69,8 +69,10 @@ class Indocker::DeployContext
|
|
69
69
|
container.before_start_proc.call(container, number)
|
70
70
|
end
|
71
71
|
|
72
|
+
stop_timeout = container.get_start_option(:stop_timeout)
|
73
|
+
|
72
74
|
if container_id
|
73
|
-
Indocker::Docker.stop(hostname, skip_errors: true)
|
75
|
+
Indocker::Docker.stop(hostname, time: stop_timeout, skip_errors: true)
|
74
76
|
else
|
75
77
|
Indocker::Docker.rm(hostname, skip_errors: true)
|
76
78
|
end
|
@@ -97,4 +99,4 @@ class Indocker::DeployContext
|
|
97
99
|
|
98
100
|
nil
|
99
101
|
end
|
100
|
-
end
|
102
|
+
end
|
data/lib/indocker/docker.rb
CHANGED
@@ -18,7 +18,8 @@ class Indocker::Docker
|
|
18
18
|
Indocker::Shell.command("docker pull #{url}", Indocker.logger)
|
19
19
|
end
|
20
20
|
|
21
|
-
def stop(container_name, time
|
21
|
+
def stop(container_name, time: nil, skip_errors: false)
|
22
|
+
time ||= 10 # default timeout for Linux
|
22
23
|
Indocker::Shell.command("docker stop --time=#{time} #{container_name}", Indocker.logger, skip_errors: skip_errors)
|
23
24
|
rm(container_name, skip_errors: skip_errors)
|
24
25
|
end
|
data/lib/indocker/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: indocker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ruslan Gatiyatov
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-12-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: net-ssh
|