ecs_deployer 0.1.13 → 0.1.14
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/.gitignore +0 -1
- data/README.md +3 -1
- data/circle.yml +4 -0
- data/ecs_deployer.gemspec +1 -0
- data/lib/ecs_deployer/cli.rb +2 -0
- data/lib/ecs_deployer/client.rb +13 -12
- data/lib/ecs_deployer/version.rb +1 -1
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99a7cf49a1d03e03b5123ca450ec7bd47556727c
|
4
|
+
data.tar.gz: f5b5034613058e2d751cd02ddb87f74642dfe3d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a242f366905b234991bedbd4bb9c57158ed151043fa9a82bde5bbc1ec2b26c4e0d1928b0a04af621447200f2d4bc8a8ea715b8de74f767ba10dfbb98467bca5c
|
7
|
+
data.tar.gz: ae03c016bbf5f3079120703551867cb19be4a8a27409f5dc25ecacb58b5d479725f2f51cd5b9fcd44a5b211405f5060b1e74c45c52f88a42d6c2e221751f7bd9
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
# EcsDeployer
|
2
2
|
|
3
|
-
[](https://circleci.com/gh/naomichi-y/ecs_deployer/tree/master)
|
4
3
|
[](https://badge.fury.io/rb/ecs_deployer)
|
4
|
+
[](https://codeclimate.com/github/naomichi-y/ecs_deployer/coverage)
|
5
|
+
[](https://codeclimate.com/github/naomichi-y/ecs_deployer)
|
6
|
+
[](https://circleci.com/gh/naomichi-y/ecs_deployer/tree/master)
|
5
7
|
|
6
8
|
## Description
|
7
9
|
|
data/circle.yml
ADDED
data/ecs_deployer.gemspec
CHANGED
data/lib/ecs_deployer/cli.rb
CHANGED
data/lib/ecs_deployer/client.rb
CHANGED
@@ -15,9 +15,10 @@ module EcsDeployer
|
|
15
15
|
# @param [Hash] aws_options
|
16
16
|
# @option aws_options [String] :profile
|
17
17
|
# @option aws_options [String] :region
|
18
|
+
# @param [RuntimeCommand::Builder] runtime
|
18
19
|
# @return [EcsDeployer::Client]
|
19
|
-
def initialize(aws_options = {})
|
20
|
-
@
|
20
|
+
def initialize(aws_options = {}, runtime = nil)
|
21
|
+
@runtime = runtime || RuntimeCommand::Builder.new
|
21
22
|
@cli = Aws::ECS::Client.new(aws_options)
|
22
23
|
@kms = Aws::KMS::Client.new(aws_options)
|
23
24
|
@timeout = 600
|
@@ -189,7 +190,7 @@ module EcsDeployer
|
|
189
190
|
raise TaskDesiredError, 'Task desired by service is 0.' if service_status[:desired_count].zero?
|
190
191
|
|
191
192
|
wait_time = 0
|
192
|
-
@
|
193
|
+
@runtime.puts 'Start deploing...'
|
193
194
|
|
194
195
|
loop do
|
195
196
|
sleep(@pauling_interval)
|
@@ -197,21 +198,21 @@ module EcsDeployer
|
|
197
198
|
result = deploy_status(cluster, service)
|
198
199
|
|
199
200
|
if result[:new_running_count] == result[:current_running_count]
|
200
|
-
@
|
201
|
-
@
|
201
|
+
@runtime.puts "Service update succeeded. [#{result[:new_running_count]}/#{result[:current_running_count]}]"
|
202
|
+
@runtime.puts "New task definition: #{@new_task_definition_arn}"
|
202
203
|
|
203
204
|
break
|
204
205
|
|
205
206
|
else
|
206
|
-
@
|
207
|
-
@
|
208
|
-
@
|
209
|
-
@
|
210
|
-
@
|
211
|
-
@
|
207
|
+
@runtime.puts "Deploying... [#{result[:new_running_count]}/#{result[:current_running_count]}] (#{wait_time} seconds elapsed)"
|
208
|
+
@runtime.puts "New task: #{@new_task_definition_arn}"
|
209
|
+
@runtime.puts LOG_SEPARATOR
|
210
|
+
@runtime.puts result[:task_status_logs]
|
211
|
+
@runtime.puts LOG_SEPARATOR
|
212
|
+
@runtime.puts 'You can stop process with Ctrl+C. Deployment will continue.'
|
212
213
|
|
213
214
|
if wait_time > @timeout
|
214
|
-
@
|
215
|
+
@runtime.puts "New task definition: #{@new_task_definition_arn}"
|
215
216
|
raise DeployTimeoutError, 'Service is being updating, but process is timed out.'
|
216
217
|
end
|
217
218
|
end
|
data/lib/ecs_deployer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecs_deployer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- naomichi-y
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: runtime_command
|
@@ -164,6 +164,20 @@ dependencies:
|
|
164
164
|
- - ">="
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: codeclimate-test-reporter
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
167
181
|
description: This package provides the service deployment function of ECS.
|
168
182
|
email:
|
169
183
|
- n.yamakita@gmail.com
|
@@ -180,6 +194,7 @@ files:
|
|
180
194
|
- Rakefile
|
181
195
|
- bin/console
|
182
196
|
- bin/setup
|
197
|
+
- circle.yml
|
183
198
|
- ecs_deployer.gemspec
|
184
199
|
- example/sample.rb
|
185
200
|
- exe/ecs_deployer
|