dpl-elastic_beanstalk 1.10.8.travis.3236.5 → 1.10.8

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: 5e49e7b58fffcfc9183a6a7db84cd3cbd94dbe17c0fe16b437d6bddddc763bed
4
- data.tar.gz: 3752ba5405dbc0434aed1a86bf6b91af7a382bcb480d09e2a90525044a9185ad
3
+ metadata.gz: 88b5d0e19901ec4b0066bb3de498f26f117f969cde5ebea489c3dd5f8cb9b75b
4
+ data.tar.gz: bf6f805b75a962d47625059267bb2850068337d45f71a53fdb73772103ab56d0
5
5
  SHA512:
6
- metadata.gz: 277eb69ad218b6f96c18a955722832026a573497c0c23d2db723e21bfaaae6611c35c603d7c65a1580c6833d4f9387cd7fffca92a721acdd5095441539724d39
7
- data.tar.gz: cf7d573e256370701b22e4490b0c6d3f6ea0a15a266e543138f6a1f41bc49bc1d99cd62adf42e2567ee2acef0e12d9105580382197c920d6697c21d140ebdc16
6
+ metadata.gz: 7edd626c8bf6a29ff36a94bbdc7a7304d791e6f42e9a9d248651446dd47953f740960bc03addad0d69c6fa9e643680970f6c161a857e33751547340fafd12c4e
7
+ data.tar.gz: 0cfeca389a77b777e62f8f43a19d8aafda3eb1e2c53a8d38813fed76424a19470c66b0fc3480ab7e512d53664c031a34e172a62e866c82b4bda164e7e07f7838
@@ -152,31 +152,45 @@ module DPL
152
152
  def wait_until_deployed
153
153
  errorEvents = 0 # errors counter, should remain 0 for successful deployment
154
154
  events = []
155
+ tries = 0
156
+ max_tries = 10
155
157
 
156
158
  loop do
157
- environment = eb.describe_environments({
158
- :application_name => app_name,
159
- :environment_names => [env_name]
160
- })[:environments].first
161
-
162
- eb.describe_events({
163
- :environment_name => env_name,
164
- :start_time => @start_time.utc.iso8601,
165
- })[:events].reverse.each do |event|
166
- message = "#{event[:event_date]} [#{event[:severity]}] #{event[:message]}"
167
- unless events.include?(message)
168
- events.push(message)
169
- if event[:severity] == "ERROR"
170
- errorEvents += 1
171
- warn(message)
172
- else
173
- log(message)
159
+ if tries >= max_tries
160
+ log "Too many failures"
161
+ break
162
+ end
163
+
164
+ begin
165
+ environment = eb.describe_environments({
166
+ :application_name => app_name,
167
+ :environment_names => [env_name]
168
+ })[:environments].first
169
+
170
+ eb.describe_events({
171
+ :environment_name => env_name,
172
+ :start_time => @start_time.utc.iso8601,
173
+ })[:events].reverse.each do |event|
174
+ message = "#{event[:event_date]} [#{event[:severity]}] #{event[:message]}"
175
+ unless events.include?(message)
176
+ events.push(message)
177
+ if event[:severity] == "ERROR"
178
+ errorEvents += 1
179
+ warn(message)
180
+ else
181
+ log(message)
182
+ end
174
183
  end
175
184
  end
176
- end
177
185
 
178
- break if environment[:status] == "Ready"
179
- sleep 5
186
+ break if environment[:status] == "Ready"
187
+ sleep 5
188
+ rescue Aws::Errors::ServiceError => e
189
+ log "Caught #{e}: #{e.message}"
190
+ log "Continuing..."
191
+ ensure
192
+ tries += 1
193
+ end
180
194
  end
181
195
 
182
196
  if errorEvents > 0 then error("Deployment failed.") end
data/lib/dpl/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module DPL
2
- VERSION = '1.10.8.travis.3236.5'
2
+ VERSION = '1.10.8'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dpl-elastic_beanstalk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.8.travis.3236.5
4
+ version: 1.10.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Haase
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-21 00:00:00.000000000 Z
11
+ date: 2019-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dpl
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.10.8.travis.3236.5
19
+ version: 1.10.8
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 1.10.8.travis.3236.5
26
+ version: 1.10.8
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: aws-sdk
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -203,12 +203,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
203
203
  version: '2.2'
204
204
  required_rubygems_version: !ruby/object:Gem::Requirement
205
205
  requirements:
206
- - - ">"
206
+ - - ">="
207
207
  - !ruby/object:Gem::Version
208
- version: 1.3.1
208
+ version: '0'
209
209
  requirements: []
210
210
  rubygems_version: 3.0.3
211
211
  signing_key:
212
212
  specification_version: 4
213
213
  summary: deploy tool
214
- test_files: []
214
+ test_files:
215
+ - spec/provider/elastic_beanstalk_spec.rb