ecs_deployer 1.0.8 → 1.0.9
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/ecs_deployer.gemspec +0 -1
- data/lib/ecs_deployer/client.rb +13 -15
- data/lib/ecs_deployer/version.rb +1 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f24b082f8528d335aa2d2964e2ecdab7b524706d
|
4
|
+
data.tar.gz: 8bfc99e043a12bf461c8c1ba44e78bac504be3ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f695b7acc3c7ed06dae88424d86a8dbc825c741ee24dd254fc42d2ba9750d01ce5269056cc525e3dbc7cb36126aa070b9bbd381984bc5033acd80a28c86aac8e
|
7
|
+
data.tar.gz: e730b9fc3f9a23742e6d0cce1797ff4eafb7943e5b66b535c32c4492515d40308959c7ec12cad214328da9bc908c9c94494b0f33e543cfd511430de28061d128
|
data/ecs_deployer.gemspec
CHANGED
@@ -30,7 +30,6 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
31
31
|
spec.require_paths = ['lib']
|
32
32
|
|
33
|
-
spec.add_dependency 'runtime_command', '~> 1.0'
|
34
33
|
spec.add_dependency 'oj', '~> 3.0'
|
35
34
|
spec.add_dependency 'thor', '~> 0.19'
|
36
35
|
spec.add_dependency 'aws-sdk', '~> 2.9'
|
data/lib/ecs_deployer/client.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
require 'yaml'
|
2
2
|
require 'oj'
|
3
3
|
require 'aws-sdk'
|
4
|
-
require 'runtime_command'
|
5
4
|
require 'base64'
|
6
5
|
|
7
6
|
module EcsDeployer
|
@@ -12,11 +11,10 @@ module EcsDeployer
|
|
12
11
|
attr_reader :cli
|
13
12
|
attr_accessor :timeout, :pauling_interval
|
14
13
|
|
15
|
-
# @param [
|
16
|
-
# @param [Hash] runtime_options
|
14
|
+
# @param [Logger] logger
|
17
15
|
# @return [EcsDeployer::Client]
|
18
|
-
def initialize(
|
19
|
-
@
|
16
|
+
def initialize(logger = nil, aws_options = {})
|
17
|
+
@logger = logger.nil? ? Logger.new(STDOUT) : logger
|
20
18
|
@cli = Aws::ECS::Client.new(aws_options)
|
21
19
|
@kms = Aws::KMS::Client.new(aws_options)
|
22
20
|
@timeout = 600
|
@@ -212,7 +210,7 @@ module EcsDeployer
|
|
212
210
|
raise TaskDesiredError, 'Task desired by service is 0.' if service_status[:desired_count].zero?
|
213
211
|
|
214
212
|
wait_time = 0
|
215
|
-
@
|
213
|
+
@logger.info 'Start deploying...'
|
216
214
|
|
217
215
|
loop do
|
218
216
|
sleep(@pauling_interval)
|
@@ -220,25 +218,25 @@ module EcsDeployer
|
|
220
218
|
result = deploy_status(cluster, service)
|
221
219
|
|
222
220
|
if result[:new_running_count] == result[:current_running_count]
|
223
|
-
@
|
224
|
-
@
|
221
|
+
@logger.info "Service update succeeded. [#{result[:new_running_count]}/#{result[:current_running_count]}]"
|
222
|
+
@logger.info "New task definition: #{@new_task_definition_arn}"
|
225
223
|
|
226
224
|
break
|
227
225
|
|
228
226
|
else
|
229
|
-
@
|
230
|
-
@
|
231
|
-
@
|
227
|
+
@logger.info "Deploying... [#{result[:new_running_count]}/#{result[:current_running_count]}] (#{wait_time} seconds elapsed)"
|
228
|
+
@logger.info "New task: #{@new_task_definition_arn}"
|
229
|
+
@logger.info LOG_SEPARATOR
|
232
230
|
|
233
231
|
result[:task_status_logs].each do |log|
|
234
|
-
@
|
232
|
+
@logger.info log
|
235
233
|
end
|
236
234
|
|
237
|
-
@
|
238
|
-
@
|
235
|
+
@logger.info LOG_SEPARATOR
|
236
|
+
@logger.info 'You can stop process with Ctrl+C. Deployment will continue.'
|
239
237
|
|
240
238
|
if wait_time > @timeout
|
241
|
-
@
|
239
|
+
@logger.info "New task definition: #{@new_task_definition_arn}"
|
242
240
|
raise DeployTimeoutError, 'Service is being updating, but process is timed out.'
|
243
241
|
end
|
244
242
|
end
|
data/lib/ecs_deployer/version.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecs_deployer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.9
|
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-08-
|
11
|
+
date: 2017-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: runtime_command
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '1.0'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: oj
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|