eb_deployer 0.2.6 → 0.2.7
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.
- data/lib/eb_deployer/version.rb +1 -1
- data/lib/eb_deployer.rb +14 -2
- data/test/deploy_test.rb +25 -0
- metadata +4 -3
data/lib/eb_deployer/version.rb
CHANGED
data/lib/eb_deployer.rb
CHANGED
@@ -172,6 +172,7 @@ module EbDeployer
|
|
172
172
|
smoke_test = opts[:smoke_test] || Proc.new {}
|
173
173
|
phoenix_mode = opts[:phoenix_mode]
|
174
174
|
bucket = opts[:package_bucket] || app
|
175
|
+
skip_resource = opts[:skip_resource_stack_update]
|
175
176
|
|
176
177
|
application = Application.new(app, bs, s3, bucket)
|
177
178
|
|
@@ -183,7 +184,7 @@ module EbDeployer
|
|
183
184
|
:smoke_test => smoke_test,
|
184
185
|
:phoenix_mode => phoenix_mode)
|
185
186
|
|
186
|
-
if resources = opts[:resources]
|
187
|
+
if !skip_resource && resources = opts[:resources]
|
187
188
|
env_settings += cf.provision(resources)
|
188
189
|
end
|
189
190
|
|
@@ -214,7 +215,14 @@ module EbDeployer
|
|
214
215
|
parser.parse!
|
215
216
|
action = options.delete(:action)
|
216
217
|
|
217
|
-
|
218
|
+
if File.exists?(options[:config_file])
|
219
|
+
if !options[:package]
|
220
|
+
puts "Found configuration at #{options[:config_file]}."
|
221
|
+
puts "Now execute 'eb_deploy -p <package name>' to deploy"
|
222
|
+
puts "'eb_deploy --help') for more options"
|
223
|
+
exit(2)
|
224
|
+
end
|
225
|
+
else
|
218
226
|
puts "Generated default configuration at #{options[:config_file]}."
|
219
227
|
DefaultConfig.new(File.basename(Dir.pwd)).write_to(options[:config_file])
|
220
228
|
exit(2)
|
@@ -251,6 +259,10 @@ module EbDeployer
|
|
251
259
|
options[:action] = :destroy
|
252
260
|
end
|
253
261
|
|
262
|
+
opts.on("--skip-resource-stack-update", "skip cloud-formation stack update. (only for extreme situation like hitting a cloudformation bug)") do |v|
|
263
|
+
options[:skip_resource_stack_update] = true
|
264
|
+
end
|
265
|
+
|
254
266
|
opts.on("-v", "--version", "Print current version") do |v|
|
255
267
|
puts "eb_deployer v#{VERSION}"
|
256
268
|
exit(0)
|
data/test/deploy_test.rb
CHANGED
@@ -195,6 +195,31 @@ class DeployTest < Minitest::Test
|
|
195
195
|
assert_equal({'a' => 1 }, @cf_driver.stack_config('simple-production')[:parameters])
|
196
196
|
end
|
197
197
|
|
198
|
+
def test_skip_resource_update
|
199
|
+
cf_template = temp_file(JSON.dump({'Resources' => {'R1' => {}}}))
|
200
|
+
deploy(:application => 'simple', :environment => "production",
|
201
|
+
:resources => {
|
202
|
+
:template => cf_template,
|
203
|
+
:parameters => {'a' => 1 }
|
204
|
+
})
|
205
|
+
assert_equal(1, @cf_driver.stack_config('simple-production')[:parameters]['a'])
|
206
|
+
deploy(:application => 'simple', :environment => "production",
|
207
|
+
:resources => {
|
208
|
+
:template => cf_template,
|
209
|
+
:parameters => {'a' => 2 }
|
210
|
+
})
|
211
|
+
assert_equal(2, @cf_driver.stack_config('simple-production')[:parameters]['a'])
|
212
|
+
deploy(:application => 'simple',
|
213
|
+
:environment => "production",
|
214
|
+
:skip_resource_stack_update => true,
|
215
|
+
:resources => {
|
216
|
+
:template => cf_template,
|
217
|
+
:parameters => {'a' => 3 }
|
218
|
+
})
|
219
|
+
assert_equal(2, @cf_driver.stack_config('simple-production')[:parameters]['a'])
|
220
|
+
end
|
221
|
+
|
222
|
+
|
198
223
|
def test_set_s3_bucket_name_on_deployment
|
199
224
|
deploy(:application => 'simple',
|
200
225
|
:environment => "production",
|
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.2.
|
4
|
+
version: 0.2.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-10-
|
13
|
+
date: 2013-10-30 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: aws-sdk
|
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
104
|
version: '0'
|
105
105
|
requirements: []
|
106
106
|
rubyforge_project:
|
107
|
-
rubygems_version: 1.8.
|
107
|
+
rubygems_version: 1.8.24
|
108
108
|
signing_key:
|
109
109
|
specification_version: 3
|
110
110
|
summary: Low friction deployments should be a breeze. Elastic Beanstalk provides a
|
@@ -117,3 +117,4 @@ test_files:
|
|
117
117
|
- test/deploy_test.rb
|
118
118
|
- test/smoke_test_test.rb
|
119
119
|
- test/test_helper.rb
|
120
|
+
has_rdoc:
|