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 +4 -4
- data/lib/dpl/provider/elastic_beanstalk.rb +34 -20
- data/lib/dpl/version.rb +1 -1
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88b5d0e19901ec4b0066bb3de498f26f117f969cde5ebea489c3dd5f8cb9b75b
|
4
|
+
data.tar.gz: bf6f805b75a962d47625059267bb2850068337d45f71a53fdb73772103ab56d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
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
|
-
|
179
|
-
|
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
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
|
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-
|
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
|
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
|
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:
|
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
|