container_ship 0.1.0 → 0.1.1
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 +57 -0
- data/.rubocop.yml +25 -0
- data/Gemfile +3 -1
- data/Gemfile.lock +69 -66
- data/README.md +23 -12
- data/Rakefile +5 -3
- data/container_ship.gemspec +9 -6
- data/lib/container_ship.rb +2 -0
- data/lib/container_ship/cli.rb +2 -0
- data/lib/container_ship/command.rb +2 -0
- data/lib/container_ship/command/exec_command.rb +5 -3
- data/lib/container_ship/command/init_command.rb +3 -1
- data/lib/container_ship/command/modules/cloudwatch.rb +2 -0
- data/lib/container_ship/command/modules/docker.rb +3 -1
- data/lib/container_ship/command/modules/ecs.rb +4 -1
- data/lib/container_ship/command/modules/print_task.rb +3 -1
- data/lib/container_ship/command/ship_command.rb +2 -0
- data/lib/container_ship/task_definition.rb +2 -0
- data/lib/container_ship/version.rb +3 -1
- metadata +5 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5b7ae1e6c79b424625cdfd5f12eacc00fd546ec046151606984a76c5d50cc489
|
|
4
|
+
data.tar.gz: 1691ee2c77d5f0ddf8064b4966abc2a326ad748615ec5f1b935037d3bc23b38a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4a11192e9091856be8e69fea92399a8e97977a8a8778bb5b6671162c9d149380938d3f5162418277e05a77f28c2c472c8cf2e37054150a40752ee82f90976485
|
|
7
|
+
data.tar.gz: 06543a4fd7906c378acd0a8e3f3d4c6725a594672ad6175f3fc215c769a7cdf30e52e7832a87f2b9889e783218debf9bd0eafc32d9249ba653b0db3476bf8a9a
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
version: 2.1
|
|
2
|
+
|
|
3
|
+
update_bundler: &update_bundler
|
|
4
|
+
run:
|
|
5
|
+
name: update bundler
|
|
6
|
+
command: gem update bundler
|
|
7
|
+
|
|
8
|
+
bundle_install: &bundle_install
|
|
9
|
+
run:
|
|
10
|
+
name: bundle install
|
|
11
|
+
command: bundle install --path vendor/bundle --jobs 4
|
|
12
|
+
|
|
13
|
+
git statusrestore_bundle_cache: &restore_bundle_cache
|
|
14
|
+
restore_cache:
|
|
15
|
+
key: cache-bundler-{{ checksum "Gemfile.lock" }}
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
build:
|
|
19
|
+
docker:
|
|
20
|
+
- image: circleci/ruby
|
|
21
|
+
steps:
|
|
22
|
+
- checkout
|
|
23
|
+
- *restore_bundle_cache
|
|
24
|
+
- *update_bundler
|
|
25
|
+
- *bundle_install
|
|
26
|
+
- save_cache:
|
|
27
|
+
key: cache-bundler-{{ checksum "Gemfile.lock" }}
|
|
28
|
+
paths:
|
|
29
|
+
- vendor/bundle
|
|
30
|
+
rubocop:
|
|
31
|
+
docker:
|
|
32
|
+
- image: circleci/ruby
|
|
33
|
+
steps:
|
|
34
|
+
- checkout
|
|
35
|
+
- *restore_bundle_cache
|
|
36
|
+
- *update_bundler
|
|
37
|
+
- *bundle_install
|
|
38
|
+
- run: bundle exec rubocop
|
|
39
|
+
rspec:
|
|
40
|
+
docker:
|
|
41
|
+
- image: circleci/ruby
|
|
42
|
+
steps:
|
|
43
|
+
- checkout
|
|
44
|
+
- *restore_bundle_cache
|
|
45
|
+
- *update_bundler
|
|
46
|
+
- *bundle_install
|
|
47
|
+
- run:
|
|
48
|
+
command: bundle exec rspec
|
|
49
|
+
workflows:
|
|
50
|
+
version: 2.1
|
|
51
|
+
rspec:
|
|
52
|
+
jobs:
|
|
53
|
+
- build
|
|
54
|
+
- rubocop:
|
|
55
|
+
requires: [build]
|
|
56
|
+
- rspec:
|
|
57
|
+
requires: [build]
|
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
AllCops:
|
|
2
|
+
Exclude:
|
|
3
|
+
- 'vendor/**/*'
|
|
4
|
+
- 'spec/support/*'
|
|
5
|
+
- 'spec/spec_helper.rb'
|
|
6
|
+
- 'Rakefile'
|
|
7
|
+
Layout/MultilineMethodCallIndentation:
|
|
8
|
+
EnforcedStyle: indented_relative_to_receiver
|
|
9
|
+
Style/FrozenStringLiteralComment:
|
|
10
|
+
Enabled: false
|
|
11
|
+
Documentation:
|
|
12
|
+
Enabled: false
|
|
13
|
+
Metrics/BlockLength:
|
|
14
|
+
Exclude:
|
|
15
|
+
- 'spec/**/*'
|
|
16
|
+
Metrics/LineLength:
|
|
17
|
+
Max: 120
|
|
18
|
+
AllowURI: true
|
|
19
|
+
URISchemes:
|
|
20
|
+
- http
|
|
21
|
+
- https
|
|
22
|
+
Metrics/AbcSize:
|
|
23
|
+
Max: 30
|
|
24
|
+
Metrics/MethodLength:
|
|
25
|
+
Max: 30
|
data/Gemfile
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.1)
|
|
5
5
|
aws-sdk-cloudwatchlogs
|
|
6
6
|
aws-sdk-ecs
|
|
7
7
|
thor
|
|
@@ -9,53 +9,52 @@ PATH
|
|
|
9
9
|
GEM
|
|
10
10
|
remote: https://rubygems.org/
|
|
11
11
|
specs:
|
|
12
|
-
activesupport (6.0.
|
|
12
|
+
activesupport (6.0.3.2)
|
|
13
13
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
14
14
|
i18n (>= 0.7, < 2)
|
|
15
15
|
minitest (~> 5.1)
|
|
16
16
|
tzinfo (~> 1.1)
|
|
17
|
-
zeitwerk (~> 2.
|
|
17
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
|
18
18
|
addressable (2.7.0)
|
|
19
19
|
public_suffix (>= 2.0.2, < 5.0)
|
|
20
|
-
ast (2.4.
|
|
21
|
-
aws-eventstream (1.0
|
|
22
|
-
aws-partitions (1.
|
|
23
|
-
aws-sdk-cloudwatchlogs (1.
|
|
24
|
-
aws-sdk-core (~> 3, >= 3.
|
|
20
|
+
ast (2.4.1)
|
|
21
|
+
aws-eventstream (1.1.0)
|
|
22
|
+
aws-partitions (1.365.0)
|
|
23
|
+
aws-sdk-cloudwatchlogs (1.36.0)
|
|
24
|
+
aws-sdk-core (~> 3, >= 3.99.0)
|
|
25
25
|
aws-sigv4 (~> 1.1)
|
|
26
|
-
aws-sdk-core (3.
|
|
27
|
-
aws-eventstream (~> 1
|
|
28
|
-
aws-partitions (~> 1.0)
|
|
26
|
+
aws-sdk-core (3.105.0)
|
|
27
|
+
aws-eventstream (~> 1, >= 1.0.2)
|
|
28
|
+
aws-partitions (~> 1, >= 1.239.0)
|
|
29
29
|
aws-sigv4 (~> 1.1)
|
|
30
30
|
jmespath (~> 1.0)
|
|
31
|
-
aws-sdk-ecs (1.
|
|
32
|
-
aws-sdk-core (~> 3, >= 3.
|
|
31
|
+
aws-sdk-ecs (1.68.0)
|
|
32
|
+
aws-sdk-core (~> 3, >= 3.99.0)
|
|
33
33
|
aws-sigv4 (~> 1.1)
|
|
34
|
-
aws-sigv4 (1.
|
|
35
|
-
aws-eventstream (~> 1
|
|
36
|
-
codecov (0.
|
|
34
|
+
aws-sigv4 (1.2.2)
|
|
35
|
+
aws-eventstream (~> 1, >= 1.0.2)
|
|
36
|
+
codecov (0.2.10)
|
|
37
37
|
json
|
|
38
38
|
simplecov
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
diff-lcs (1.3)
|
|
39
|
+
coderay (1.1.3)
|
|
40
|
+
concurrent-ruby (1.1.7)
|
|
41
|
+
diff-lcs (1.4.4)
|
|
43
42
|
docile (1.3.2)
|
|
44
|
-
faraday (0.
|
|
43
|
+
faraday (1.0.1)
|
|
45
44
|
multipart-post (>= 1.2, < 3)
|
|
46
|
-
faraday-http-cache (2.
|
|
47
|
-
faraday (
|
|
48
|
-
ffi (1.
|
|
45
|
+
faraday-http-cache (2.2.0)
|
|
46
|
+
faraday (>= 0.8)
|
|
47
|
+
ffi (1.13.1)
|
|
49
48
|
formatador (0.2.5)
|
|
50
|
-
github_changelog_generator (1.
|
|
49
|
+
github_changelog_generator (1.15.2)
|
|
51
50
|
activesupport
|
|
52
51
|
faraday-http-cache
|
|
53
52
|
multi_json
|
|
54
53
|
octokit (~> 4.6)
|
|
55
|
-
rainbow (>= 2.1)
|
|
54
|
+
rainbow (>= 2.2.1)
|
|
56
55
|
rake (>= 10.0)
|
|
57
|
-
retriable (~>
|
|
58
|
-
guard (2.
|
|
56
|
+
retriable (~> 3.0)
|
|
57
|
+
guard (2.16.2)
|
|
59
58
|
formatador (>= 0.2.4)
|
|
60
59
|
listen (>= 2.7, < 4.0)
|
|
61
60
|
lumberjack (>= 1.0.12, < 2.0)
|
|
@@ -72,75 +71,79 @@ GEM
|
|
|
72
71
|
guard-rubocop (1.3.0)
|
|
73
72
|
guard (~> 2.0)
|
|
74
73
|
rubocop (~> 0.20)
|
|
75
|
-
i18n (1.
|
|
74
|
+
i18n (1.8.5)
|
|
76
75
|
concurrent-ruby (~> 1.0)
|
|
77
|
-
jaro_winkler (1.5.3)
|
|
78
76
|
jmespath (1.4.0)
|
|
79
|
-
json (2.
|
|
80
|
-
listen (3.2.
|
|
77
|
+
json (2.3.1)
|
|
78
|
+
listen (3.2.1)
|
|
81
79
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
|
82
80
|
rb-inotify (~> 0.9, >= 0.9.10)
|
|
83
|
-
lumberjack (1.
|
|
84
|
-
method_source (0.
|
|
85
|
-
minitest (5.
|
|
86
|
-
multi_json (1.
|
|
81
|
+
lumberjack (1.2.8)
|
|
82
|
+
method_source (1.0.0)
|
|
83
|
+
minitest (5.14.2)
|
|
84
|
+
multi_json (1.15.0)
|
|
87
85
|
multipart-post (2.1.1)
|
|
88
86
|
nenv (0.3.0)
|
|
89
87
|
notiffany (0.1.3)
|
|
90
88
|
nenv (~> 0.1)
|
|
91
89
|
shellany (~> 0.0)
|
|
92
|
-
octokit (4.
|
|
90
|
+
octokit (4.18.0)
|
|
91
|
+
faraday (>= 0.9)
|
|
93
92
|
sawyer (~> 0.8.0, >= 0.5.3)
|
|
94
|
-
parallel (1.
|
|
95
|
-
parser (2.
|
|
96
|
-
ast (~> 2.4.
|
|
97
|
-
pry (0.
|
|
98
|
-
coderay (~> 1.1
|
|
99
|
-
method_source (~>
|
|
100
|
-
public_suffix (4.0.
|
|
93
|
+
parallel (1.19.2)
|
|
94
|
+
parser (2.7.1.4)
|
|
95
|
+
ast (~> 2.4.1)
|
|
96
|
+
pry (0.13.1)
|
|
97
|
+
coderay (~> 1.1)
|
|
98
|
+
method_source (~> 1.0)
|
|
99
|
+
public_suffix (4.0.6)
|
|
101
100
|
rainbow (3.0.0)
|
|
102
|
-
rake (13.0.
|
|
103
|
-
rb-fsevent (0.10.
|
|
104
|
-
rb-inotify (0.10.
|
|
101
|
+
rake (13.0.1)
|
|
102
|
+
rb-fsevent (0.10.4)
|
|
103
|
+
rb-inotify (0.10.1)
|
|
105
104
|
ffi (~> 1.0)
|
|
106
|
-
|
|
105
|
+
regexp_parser (1.7.1)
|
|
106
|
+
retriable (3.1.2)
|
|
107
|
+
rexml (3.2.4)
|
|
107
108
|
rspec (3.9.0)
|
|
108
109
|
rspec-core (~> 3.9.0)
|
|
109
110
|
rspec-expectations (~> 3.9.0)
|
|
110
111
|
rspec-mocks (~> 3.9.0)
|
|
111
|
-
rspec-core (3.9.
|
|
112
|
-
rspec-support (~> 3.9.
|
|
113
|
-
rspec-expectations (3.9.
|
|
112
|
+
rspec-core (3.9.2)
|
|
113
|
+
rspec-support (~> 3.9.3)
|
|
114
|
+
rspec-expectations (3.9.2)
|
|
114
115
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
115
116
|
rspec-support (~> 3.9.0)
|
|
116
|
-
rspec-mocks (3.9.
|
|
117
|
+
rspec-mocks (3.9.1)
|
|
117
118
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
118
119
|
rspec-support (~> 3.9.0)
|
|
119
|
-
rspec-support (3.9.
|
|
120
|
-
rubocop (0.
|
|
121
|
-
jaro_winkler (~> 1.5.1)
|
|
120
|
+
rspec-support (3.9.3)
|
|
121
|
+
rubocop (0.90.0)
|
|
122
122
|
parallel (~> 1.10)
|
|
123
|
-
parser (>= 2.
|
|
123
|
+
parser (>= 2.7.1.1)
|
|
124
124
|
rainbow (>= 2.2.2, < 4.0)
|
|
125
|
+
regexp_parser (>= 1.7)
|
|
126
|
+
rexml
|
|
127
|
+
rubocop-ast (>= 0.3.0, < 1.0)
|
|
125
128
|
ruby-progressbar (~> 1.7)
|
|
126
|
-
unicode-display_width (>= 1.4.0, <
|
|
129
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
|
130
|
+
rubocop-ast (0.3.0)
|
|
131
|
+
parser (>= 2.7.1.4)
|
|
127
132
|
ruby-progressbar (1.10.1)
|
|
128
133
|
sawyer (0.8.2)
|
|
129
134
|
addressable (>= 2.3.5)
|
|
130
135
|
faraday (> 0.8, < 2.0)
|
|
131
136
|
shellany (0.0.1)
|
|
132
|
-
simplecov (0.
|
|
137
|
+
simplecov (0.19.0)
|
|
133
138
|
docile (~> 1.1)
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
thor (0.20.3)
|
|
139
|
+
simplecov-html (~> 0.11)
|
|
140
|
+
simplecov-html (0.12.2)
|
|
141
|
+
thor (1.0.1)
|
|
138
142
|
thread_safe (0.3.6)
|
|
139
|
-
tzinfo (1.2.
|
|
143
|
+
tzinfo (1.2.7)
|
|
140
144
|
thread_safe (~> 0.1)
|
|
141
|
-
unicode-display_width (1.
|
|
142
|
-
|
|
143
|
-
zeitwerk (2.2.0)
|
|
145
|
+
unicode-display_width (1.7.0)
|
|
146
|
+
zeitwerk (2.4.0)
|
|
144
147
|
|
|
145
148
|
PLATFORMS
|
|
146
149
|
ruby
|
data/README.md
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
`container_ship` is yet another ECS deployment tool.
|
|
10
10
|
|
|
11
|
-
Key features
|
|
11
|
+
## Key features
|
|
12
12
|
|
|
13
|
-
- Using raw `task_definition.json` file
|
|
13
|
+
- Using raw `task_definition.json` file instead of a template file with complex state or variables
|
|
14
14
|
- Convention over configuration
|
|
15
15
|
|
|
16
16
|
## Installation
|
|
@@ -19,9 +19,17 @@ gem 'container_ship'
|
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
## Usage
|
|
22
|
-
### Prepare
|
|
23
|
-
|
|
24
|
-
And
|
|
22
|
+
### Prepare Dockerfile
|
|
23
|
+
You need to put `Dockerfile` in your app root directory.
|
|
24
|
+
And all the services/tasks will use the image built with that.
|
|
25
|
+
|
|
26
|
+
### Prepare task_definition.json and Dockerfile
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
container_ship init YOUR_CLUSTER_NAME
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
will create empty directory for you. And you must put `task_definition.json` file in directories like below.
|
|
25
33
|
|
|
26
34
|
```
|
|
27
35
|
your_app
|
|
@@ -54,26 +62,29 @@ your_app
|
|
|
54
62
|
### Prepare ECS resources
|
|
55
63
|
You must obey `convention over configuration` concept. So, naming convention is presented below.
|
|
56
64
|
|
|
57
|
-
- ECS cluster: "#{cluster_name}-#{environment}"
|
|
58
|
-
- ECS service: "#{cluster_name}-#{service_name}-#{environment}"
|
|
59
|
-
- ECS task: "#{cluster_name}-#{task_name}-#{environment}"
|
|
65
|
+
- ECS cluster: `"#{cluster_name}-#{environment}"`
|
|
66
|
+
- ECS service: `"#{cluster_name}-#{service_name}-#{environment}"`
|
|
67
|
+
- ECS task: `"#{cluster_name}-#{task_name}-#{environment}"`
|
|
60
68
|
|
|
61
69
|
And export your ECR repository root uri.
|
|
62
70
|
|
|
63
|
-
```
|
|
71
|
+
```sh
|
|
64
72
|
export ECR_REPOSITORY=xxxxxxxxxxxxx.dkr.ecr.ap-northeast-1.amazonaws.com/
|
|
65
73
|
```
|
|
66
74
|
|
|
67
75
|
### Deploy a service
|
|
68
|
-
```
|
|
76
|
+
```sh
|
|
69
77
|
container_ship ship CLUSTER_NAME SERVICE_NAME ENVIRONMENT BUILD_NUMBER
|
|
70
78
|
```
|
|
71
79
|
|
|
80
|
+
will deploy a service in `.container_ship/CLUSTER_NAME/services/SERVICE_NAME/ENVIRONMENT/task_definition.json`
|
|
81
|
+
|
|
72
82
|
### Run a task
|
|
73
|
-
```
|
|
83
|
+
```sh
|
|
74
84
|
container_ship exec CLUSTER_NAME TASK_NAME ENVIRONMENT BUILD_NUMBER
|
|
75
85
|
```
|
|
76
|
-
|
|
86
|
+
will run a task in `.container_ship/CLUSTER_NAME/tasks/TASK_NAME/ENVIRONMENT/task_definition.json`
|
|
87
|
+
|
|
77
88
|
## Contributing
|
|
78
89
|
|
|
79
90
|
Bug reports and pull requests are welcome on GitHub at https://github.com/seibii/container_ship. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
data/Rakefile
CHANGED
data/container_ship.gemspec
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
|
2
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
|
-
require
|
|
5
|
+
require 'container_ship/version'
|
|
4
6
|
|
|
5
|
-
Gem::Specification.new do |spec|
|
|
7
|
+
Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
|
|
6
8
|
spec.name = 'container_ship'
|
|
7
9
|
spec.version = ContainerShip::VERSION
|
|
10
|
+
spec.required_ruby_version = '>= 2.4'
|
|
8
11
|
spec.authors = ['Yuji Ueki']
|
|
9
12
|
spec.email = ['unhappychoice@gmail.com']
|
|
10
13
|
|
|
11
|
-
spec.summary =
|
|
12
|
-
spec.description =
|
|
14
|
+
spec.summary = 'Yet another ECS deployment tool'
|
|
15
|
+
spec.description = 'container_ship is a simple ECS deployment tool. You only need to prepare Dockerfile and task_definition.json' # rubocop:disable Metrics/LineLength
|
|
13
16
|
spec.homepage = 'https://github.com/seibii/container_ship'
|
|
14
17
|
spec.license = 'MIT'
|
|
15
18
|
|
|
@@ -19,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
|
19
22
|
|
|
20
23
|
# Specify which files should be added to the gem when it is released.
|
|
21
24
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
22
|
-
spec.files
|
|
25
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
23
26
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
24
27
|
end
|
|
25
28
|
spec.bindir = 'exe'
|
data/lib/container_ship.rb
CHANGED
data/lib/container_ship/cli.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'aws-sdk-ecs'
|
|
2
4
|
require 'json'
|
|
3
5
|
require 'open3'
|
|
@@ -20,15 +22,15 @@ module ContainerShip
|
|
|
20
22
|
|
|
21
23
|
push_image task_definition
|
|
22
24
|
|
|
23
|
-
revision = print_around_task(
|
|
25
|
+
revision = print_around_task('Registering task definition... ') do
|
|
24
26
|
register task_definition
|
|
25
27
|
end
|
|
26
28
|
|
|
27
|
-
task_arn = print_around_task(
|
|
29
|
+
task_arn = print_around_task('Sending task request... ') do
|
|
28
30
|
run_task task_definition, revision
|
|
29
31
|
end
|
|
30
32
|
|
|
31
|
-
exit_status = print_around_task(
|
|
33
|
+
exit_status = print_around_task('Waiting task is completed... ') do
|
|
32
34
|
wait_task task_definition, task_arn
|
|
33
35
|
end
|
|
34
36
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module ContainerShip
|
|
2
4
|
module Command
|
|
3
5
|
class InitCommand
|
|
@@ -7,7 +9,7 @@ module ContainerShip
|
|
|
7
9
|
FileUtils.mkdir_p(".container_ship/#{cluster_name}/services")
|
|
8
10
|
puts "Created .container_ship/#{cluster_name}/services directory"
|
|
9
11
|
|
|
10
|
-
puts
|
|
12
|
+
puts 'Next: Create tasks_definition.json file to deploy in tasks or services directory 🖖🏻'
|
|
11
13
|
end
|
|
12
14
|
end
|
|
13
15
|
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module ContainerShip
|
|
2
4
|
module Command
|
|
3
5
|
module Modules
|
|
@@ -15,7 +17,7 @@ module ContainerShip
|
|
|
15
17
|
o.each { |line| puts line }
|
|
16
18
|
status = w.value
|
|
17
19
|
end
|
|
18
|
-
exit(status.
|
|
20
|
+
exit(status.exitstatus) unless status.success?
|
|
19
21
|
end
|
|
20
22
|
end
|
|
21
23
|
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module ContainerShip
|
|
2
4
|
module Command
|
|
3
5
|
module Modules
|
|
@@ -47,13 +49,14 @@ module ContainerShip
|
|
|
47
49
|
|
|
48
50
|
def do_every_5_seconds
|
|
49
51
|
count = 0
|
|
50
|
-
|
|
52
|
+
loop do
|
|
51
53
|
sleep 3
|
|
52
54
|
print '.'
|
|
53
55
|
exit_status = yield
|
|
54
56
|
count += 1
|
|
55
57
|
next if exit_status.nil?
|
|
56
58
|
return 124 if count > 60
|
|
59
|
+
|
|
57
60
|
return exit_status
|
|
58
61
|
end
|
|
59
62
|
end
|
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.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yuji Ueki
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2020-09-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aws-sdk-cloudwatchlogs
|
|
@@ -201,7 +201,9 @@ executables:
|
|
|
201
201
|
extensions: []
|
|
202
202
|
extra_rdoc_files: []
|
|
203
203
|
files:
|
|
204
|
+
- ".circleci/config.yml"
|
|
204
205
|
- ".gitignore"
|
|
206
|
+
- ".rubocop.yml"
|
|
205
207
|
- ".travis.yml"
|
|
206
208
|
- CODE_OF_CONDUCT.md
|
|
207
209
|
- Gemfile
|
|
@@ -238,7 +240,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
238
240
|
requirements:
|
|
239
241
|
- - ">="
|
|
240
242
|
- !ruby/object:Gem::Version
|
|
241
|
-
version: '
|
|
243
|
+
version: '2.4'
|
|
242
244
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
243
245
|
requirements:
|
|
244
246
|
- - ">="
|