ecs_deployer 2.2.1 → 2.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ffe94a73b770b1f1f73415751a558f61be52f1010932c82b4d0de3b74f1f1439
4
- data.tar.gz: 8728f275df8bc41c0b16c1f18f2526aad37a87b02562704de6fd7c55db05de05
3
+ metadata.gz: 44c5cee885a21a7246c87d44fb432810dac14ec21fe2c706d8d0a5d5d05c95a4
4
+ data.tar.gz: 634d77479c637484e95a05a45fdabf838f57baa0c4933735aaf767d3f950a3a3
5
5
  SHA512:
6
- metadata.gz: 6802cd8ebc37c9a3a3d241f5b252d7d80ae85ada486af1e2e6ba151d11b2016ca01ef46225542e2de1868969ed45e30c4e59d7a1d7e6eede10db7745bacbd067
7
- data.tar.gz: 41b5eb1f40b2271c7c0478f4dbde95070e5b6ef3e2f675a2ccc25ca85c2404b3ca3edb04d3356d69521129bc9ccf626e344a4e738c0517bb4fd58b0bc5e502d2
6
+ metadata.gz: a3ff58103c942b69fdcc203a275aa1c097019dc20af226b9862858b64982123205a37fdbe011c0199c6664ebede7d1304e2ab45ab42968ea0f62f427f89ce2e0
7
+ data.tar.gz: add7ad99bf8d8bdfd832d6f743bdf968cdb7802e0c53f4190dbe5e20d1237fc5b9266be40dc78b48663951a72a7918eddfba6f9adda9788620b332f9343662f8
@@ -90,7 +90,8 @@ module EcsDeployer
90
90
  desired_status: 'RUNNING'
91
91
  )
92
92
 
93
- new_task_count = 0
93
+ new_registerd_task_count = 0
94
+ current_task_count = 0
94
95
  status_logs = []
95
96
 
96
97
  if result[:task_arns].size.positive?
@@ -100,13 +101,18 @@ module EcsDeployer
100
101
  )
101
102
 
102
103
  result[:tasks].each do |task|
103
- new_task_count += 1 if task_definition_arn == task[:task_definition_arn] && task[:last_status] == 'RUNNING'
104
+ if task_definition_arn == task[:task_definition_arn]
105
+ new_registerd_task_count += 1 if task[:last_status] == 'RUNNING'
106
+ else
107
+ current_task_count += 1
108
+ end
104
109
  status_logs << " #{task[:task_definition_arn]} [#{task[:last_status]}]"
105
110
  end
106
111
  end
107
112
 
108
113
  {
109
- new_task_count: new_task_count,
114
+ current_task_count: current_task_count,
115
+ new_registerd_task_count: new_registerd_task_count,
110
116
  status_logs: status_logs
111
117
  }
112
118
  end
@@ -130,7 +136,7 @@ module EcsDeployer
130
136
  wait_time += @polling_interval
131
137
  result = deploy_status(service, task_definition_arn)
132
138
 
133
- @logger.info "Updating... [#{result[:new_task_count]}/#{desired_count}] (#{wait_time} seconds elapsed)"
139
+ @logger.info "Updating... [#{result[:new_registerd_task_count]}/#{desired_count}] (#{wait_time} seconds elapsed)"
134
140
  @logger.info "New task: #{task_definition_arn}"
135
141
  @logger.info LOG_SEPARATOR
136
142
 
@@ -142,8 +148,8 @@ module EcsDeployer
142
148
  @logger.info LOG_SEPARATOR
143
149
  end
144
150
 
145
- if result[:new_task_count] == desired_count
146
- @logger.info "Service update succeeded. [#{result[:new_task_count]}/#{desired_count}]"
151
+ if result[:new_registerd_task_count] == desired_count && result[:current_task_count] == 0
152
+ @logger.info "Service update succeeded. [#{result[:new_registerd_task_count]}/#{desired_count}]"
147
153
  @logger.info "New task definition: #{task_definition_arn}"
148
154
 
149
155
  break
@@ -1,3 +1,3 @@
1
1
  module EcsDeployer
2
- VERSION = '2.2.1'.freeze
2
+ VERSION = '2.2.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecs_deployer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - naomichi-y