container_ship 0.1.4 → 0.1.5
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/.circleci/config.yml +3 -3
- data/.github/dependabot.yml +0 -4
- data/Gemfile.lock +19 -19
- data/lib/container_ship/cli.rb +10 -3
- data/lib/container_ship/command/exec_command.rb +3 -1
- data/lib/container_ship/command/modules/docker.rb +2 -2
- data/lib/container_ship/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: 4e4d61c12d557b710b02194829bd50f5addef1e6ec3b54a6b2a63d56f73e7b51
|
|
4
|
+
data.tar.gz: 5b5594d0a0ceed785efb79aee3a7e923f45afa6898facb6e95c85b975b25d3c7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bfe5f36b3b85791da6828d95a11eb566b066da80240fd484bfcd622dde4e04ff6f6229491ea104adfccdaaf50444d7c1403f8dfa571257ff5aa6dee6d2dafc2c
|
|
7
|
+
data.tar.gz: 2e2a2b9a1b436f741e802c4c4a96299b546770fd669073b3c9de7a961bcde216418bb069dd11b7a0e411980ee4048a63d4698612fe17d4a337c01d335d56675e
|
data/.circleci/config.yml
CHANGED
|
@@ -17,7 +17,7 @@ git statusrestore_bundle_cache: &restore_bundle_cache
|
|
|
17
17
|
jobs:
|
|
18
18
|
build:
|
|
19
19
|
docker:
|
|
20
|
-
- image:
|
|
20
|
+
- image: cimg/ruby:2.7.2
|
|
21
21
|
steps:
|
|
22
22
|
- checkout
|
|
23
23
|
- *restore_bundle_cache
|
|
@@ -29,7 +29,7 @@ jobs:
|
|
|
29
29
|
- vendor/bundle
|
|
30
30
|
rubocop:
|
|
31
31
|
docker:
|
|
32
|
-
- image:
|
|
32
|
+
- image: cimg/ruby:2.7.2
|
|
33
33
|
steps:
|
|
34
34
|
- checkout
|
|
35
35
|
- *restore_bundle_cache
|
|
@@ -38,7 +38,7 @@ jobs:
|
|
|
38
38
|
- run: bundle exec rubocop
|
|
39
39
|
rspec:
|
|
40
40
|
docker:
|
|
41
|
-
- image:
|
|
41
|
+
- image: cimg/ruby:2.7.2
|
|
42
42
|
steps:
|
|
43
43
|
- checkout
|
|
44
44
|
- *restore_bundle_cache
|
data/.github/dependabot.yml
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
container_ship (0.1.
|
|
4
|
+
container_ship (0.1.5)
|
|
5
5
|
aws-sdk-cloudwatchlogs
|
|
6
6
|
aws-sdk-ecs
|
|
7
7
|
thor
|
|
@@ -19,24 +19,24 @@ GEM
|
|
|
19
19
|
public_suffix (>= 2.0.2, < 5.0)
|
|
20
20
|
ast (2.4.2)
|
|
21
21
|
aws-eventstream (1.2.0)
|
|
22
|
-
aws-partitions (1.
|
|
23
|
-
aws-sdk-cloudwatchlogs (1.
|
|
22
|
+
aws-partitions (1.595.0)
|
|
23
|
+
aws-sdk-cloudwatchlogs (1.53.0)
|
|
24
24
|
aws-sdk-core (~> 3, >= 3.127.0)
|
|
25
25
|
aws-sigv4 (~> 1.1)
|
|
26
|
-
aws-sdk-core (3.
|
|
26
|
+
aws-sdk-core (3.131.1)
|
|
27
27
|
aws-eventstream (~> 1, >= 1.0.2)
|
|
28
28
|
aws-partitions (~> 1, >= 1.525.0)
|
|
29
29
|
aws-sigv4 (~> 1.1)
|
|
30
|
-
jmespath (~> 1.
|
|
31
|
-
aws-sdk-ecs (1.
|
|
30
|
+
jmespath (~> 1, >= 1.6.1)
|
|
31
|
+
aws-sdk-ecs (1.99.0)
|
|
32
32
|
aws-sdk-core (~> 3, >= 3.127.0)
|
|
33
33
|
aws-sigv4 (~> 1.1)
|
|
34
|
-
aws-sigv4 (1.
|
|
34
|
+
aws-sigv4 (1.5.0)
|
|
35
35
|
aws-eventstream (~> 1, >= 1.0.2)
|
|
36
36
|
codecov (0.6.0)
|
|
37
37
|
simplecov (>= 0.15, < 0.22)
|
|
38
38
|
coderay (1.1.3)
|
|
39
|
-
concurrent-ruby (1.1.
|
|
39
|
+
concurrent-ruby (1.1.10)
|
|
40
40
|
diff-lcs (1.5.0)
|
|
41
41
|
docile (1.3.5)
|
|
42
42
|
faraday (1.10.0)
|
|
@@ -54,7 +54,7 @@ GEM
|
|
|
54
54
|
faraday-em_http (1.0.0)
|
|
55
55
|
faraday-em_synchrony (1.0.0)
|
|
56
56
|
faraday-excon (1.1.0)
|
|
57
|
-
faraday-http-cache (2.
|
|
57
|
+
faraday-http-cache (2.3.0)
|
|
58
58
|
faraday (>= 0.8)
|
|
59
59
|
faraday-httpclient (1.0.1)
|
|
60
60
|
faraday-multipart (1.0.3)
|
|
@@ -93,7 +93,7 @@ GEM
|
|
|
93
93
|
rubocop (< 2.0)
|
|
94
94
|
i18n (1.10.0)
|
|
95
95
|
concurrent-ruby (~> 1.0)
|
|
96
|
-
jmespath (1.6.
|
|
96
|
+
jmespath (1.6.1)
|
|
97
97
|
listen (3.7.1)
|
|
98
98
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
|
99
99
|
rb-inotify (~> 0.9, >= 0.9.10)
|
|
@@ -106,22 +106,22 @@ GEM
|
|
|
106
106
|
notiffany (0.1.3)
|
|
107
107
|
nenv (~> 0.1)
|
|
108
108
|
shellany (~> 0.0)
|
|
109
|
-
octokit (4.
|
|
110
|
-
faraday (>=
|
|
111
|
-
sawyer (~> 0.
|
|
109
|
+
octokit (4.23.0)
|
|
110
|
+
faraday (>= 1, < 3)
|
|
111
|
+
sawyer (~> 0.9)
|
|
112
112
|
parallel (1.20.1)
|
|
113
|
-
parser (3.1.
|
|
113
|
+
parser (3.1.2.0)
|
|
114
114
|
ast (~> 2.4.1)
|
|
115
115
|
pry (0.14.1)
|
|
116
116
|
coderay (~> 1.1)
|
|
117
117
|
method_source (~> 1.0)
|
|
118
|
-
public_suffix (4.0.
|
|
118
|
+
public_suffix (4.0.7)
|
|
119
119
|
rainbow (3.1.1)
|
|
120
120
|
rake (13.0.6)
|
|
121
121
|
rb-fsevent (0.11.1)
|
|
122
122
|
rb-inotify (0.10.1)
|
|
123
123
|
ffi (~> 1.0)
|
|
124
|
-
regexp_parser (2.
|
|
124
|
+
regexp_parser (2.5.0)
|
|
125
125
|
retriable (3.1.2)
|
|
126
126
|
rexml (3.2.5)
|
|
127
127
|
rspec (3.11.0)
|
|
@@ -133,7 +133,7 @@ GEM
|
|
|
133
133
|
rspec-expectations (3.11.0)
|
|
134
134
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
135
135
|
rspec-support (~> 3.11.0)
|
|
136
|
-
rspec-mocks (3.11.
|
|
136
|
+
rspec-mocks (3.11.1)
|
|
137
137
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
138
138
|
rspec-support (~> 3.11.0)
|
|
139
139
|
rspec-support (3.11.0)
|
|
@@ -150,9 +150,9 @@ GEM
|
|
|
150
150
|
parser (>= 2.7.1.5)
|
|
151
151
|
ruby-progressbar (1.11.0)
|
|
152
152
|
ruby2_keywords (0.0.5)
|
|
153
|
-
sawyer (0.
|
|
153
|
+
sawyer (0.9.1)
|
|
154
154
|
addressable (>= 2.3.5)
|
|
155
|
-
faraday (
|
|
155
|
+
faraday (>= 0.17.3, < 3)
|
|
156
156
|
shellany (0.0.1)
|
|
157
157
|
simplecov (0.21.2)
|
|
158
158
|
docile (~> 1.1)
|
data/lib/container_ship/cli.rb
CHANGED
|
@@ -16,10 +16,17 @@ module ContainerShip
|
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
desc 'exec CLUSTER_NAME SERVICE_NAME ENVIRONMENT BUILD_NUMBER', 'exec specified task'
|
|
19
|
-
method_option 'timeout', desc: 'Timeout seconds for executing the task.
|
|
19
|
+
method_option 'timeout', default: 300, type: :numeric, desc: 'Timeout seconds for executing the task.'
|
|
20
|
+
method_option 'no_wait', default: false, type: :boolean,
|
|
21
|
+
desc: 'Exit without waiting for the task execution results. Default false.'
|
|
20
22
|
def exec(cluster_name, service_name, environment, build_number)
|
|
21
|
-
timeout = options['timeout']
|
|
22
|
-
|
|
23
|
+
timeout = options['timeout']
|
|
24
|
+
no_wait = options['no_wait']
|
|
25
|
+
Command::ExecCommand.new.run(
|
|
26
|
+
cluster_name, service_name, environment, build_number,
|
|
27
|
+
timeout: timeout,
|
|
28
|
+
no_wait: no_wait
|
|
29
|
+
)
|
|
23
30
|
end
|
|
24
31
|
|
|
25
32
|
desc 'version', 'display gem version'
|
|
@@ -17,7 +17,7 @@ module ContainerShip
|
|
|
17
17
|
include Modules::Ecs
|
|
18
18
|
include Modules::PrintTask
|
|
19
19
|
|
|
20
|
-
def run(cluster_name, task_name, environment, build_number, timeout: nil)
|
|
20
|
+
def run(cluster_name, task_name, environment, build_number, timeout: nil, no_wait: false) # rubocop:disable Metrics/ParameterLists
|
|
21
21
|
task_definition = TaskDefinition.new(cluster_name, 'tasks', task_name, environment, build_number)
|
|
22
22
|
|
|
23
23
|
push_image task_definition
|
|
@@ -30,6 +30,8 @@ module ContainerShip
|
|
|
30
30
|
run_task task_definition, revision
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
+
return if no_wait
|
|
34
|
+
|
|
33
35
|
exit_status = print_around_task('Waiting task is completed... ') do
|
|
34
36
|
wait_task task_definition, task_arn, timeout: timeout
|
|
35
37
|
end
|
|
@@ -5,15 +5,15 @@ module ContainerShip
|
|
|
5
5
|
module Modules
|
|
6
6
|
module Docker
|
|
7
7
|
def push_image(task_definition)
|
|
8
|
-
puts "docker build -t \"#{task_definition.image_name}:#{task_definition.build_number}\" ."
|
|
9
8
|
sh "docker build -t \"#{task_definition.image_name}:#{task_definition.build_number}\" ."
|
|
10
|
-
puts "docker push #{task_definition.image_name}:#{task_definition.build_number}"
|
|
11
9
|
sh "docker push #{task_definition.image_name}:#{task_definition.build_number}"
|
|
12
10
|
end
|
|
13
11
|
|
|
14
12
|
private
|
|
15
13
|
|
|
16
14
|
def sh(command)
|
|
15
|
+
puts command
|
|
16
|
+
|
|
17
17
|
status = nil
|
|
18
18
|
Open3.popen3(command) do |_i, o, e, w|
|
|
19
19
|
o.each { |line| puts line }
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: container_ship
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yuji Ueki
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-06-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aws-sdk-cloudwatchlogs
|