eb_deployer 0.6.2 → 0.6.3

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
  SHA1:
3
- metadata.gz: 737e66cde134b8ec8983b1dfc500adedab3cf526
4
- data.tar.gz: 9e54bffac3fbd172d2f4d36a15aa4dc9502d6210
3
+ metadata.gz: 14aad1fa4d35f019209b2d9cb3050586b829267f
4
+ data.tar.gz: 9564952bbde7b1172e4aa6de39c6e89e6391bebf
5
5
  SHA512:
6
- metadata.gz: 1efa091565e68ddee6a383bb6c9b343199a40aaf4f381a8bd96faac1b38c4a390aba3fce924e6e45b79d5fe165fbace47dea0d81246b96050de6123f4aff905a
7
- data.tar.gz: 678ceb2f2fa5f752b133edabbb451c8a9fb5d459bf86e51e95c20065b985cd047aa85f6ac5008065ee84e52521778771f7bc6226ae51c26b52f9385e51c19972
6
+ metadata.gz: a20e0b2939902e59bca484b029677035e6c2f63c046ef50eea48bafd739fced95f5c7b941d3b0ab75e232d744107193a3c4e795341fb634a6f163bb02b47371e
7
+ data.tar.gz: 447edf1d15f8a77f4495832c794e8f98212956bbb4a39a0a7a2c296c50b6bc5653ab927a7a2c86a2f310933832c2e480727f3e8b3136a98e2bb3b83dec22bfee
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ 0.6.3
2
+ =====
3
+
4
+ * Wait until inactive environment status is ready before applying settings.
5
+
1
6
  0.6.0
2
7
  =====
3
8
 
@@ -104,6 +104,10 @@ module EbDeployer
104
104
  get_environment_attribute(app_name, env_name, :health)
105
105
  end
106
106
 
107
+ def environment_status(app_name, env_name)
108
+ get_environment_attribute(app_name, env_name, :status)
109
+ end
110
+
107
111
  def environment_verion_label(app_name, env_name)
108
112
  get_environment_attribute(app_name, env_name, :version_label)
109
113
  end
@@ -33,6 +33,7 @@ module EbDeployer
33
33
 
34
34
  def apply_settings(settings)
35
35
  raise "Env #{self.name} not exists for applying settings" unless @bs.environment_exists?(@app, @name)
36
+ wait_for_env_status_to_be_ready
36
37
  with_polling_events(/Environment update completed successfully/i) do
37
38
  @bs.update_environment_settings(@app, @name, settings)
38
39
  end
@@ -144,6 +145,20 @@ module EbDeployer
144
145
  end
145
146
  end
146
147
 
148
+ def wait_for_env_status_to_be_ready
149
+ Timeout.timeout(600) do
150
+ current_status = @bs.environment_status(@app, @name)
151
+
152
+ while current_status.downcase != 'ready'
153
+ log("Environment status: #{current_status}")
154
+ sleep 15
155
+ current_status = @bs.environment_status(@app, @name)
156
+ end
157
+
158
+ log("Environment status: #{current_status}")
159
+ end
160
+ end
161
+
147
162
  def wait_for_env_become_healthy
148
163
  Timeout.timeout(600) do
149
164
  current_health_status = @bs.environment_health_state(@app, @name)
@@ -1,3 +1,3 @@
1
1
  module EbDeployer
2
- VERSION = "0.6.2"
2
+ VERSION = "0.6.3"
3
3
  end
@@ -161,6 +161,10 @@ class EBStub
161
161
  set_env_ready(app_name, env2_name, false)
162
162
  end
163
163
 
164
+ def environment_status(app_name, env_name)
165
+ 'ready'
166
+ end
167
+
164
168
  def environment_health_state(app_name, env_name)
165
169
  'Green'
166
170
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eb_deployer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - wpc
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-09-04 00:00:00.000000000 Z
12
+ date: 2015-09-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-sdk