elastic-beanstalk 0.1.2 → 0.1.3
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.
@@ -29,8 +29,8 @@ namespace :eb do
|
|
29
29
|
# resolve the version and set the APP_VERSION environment variable
|
30
30
|
resolve_version(args)
|
31
31
|
|
32
|
-
# configure aws credentials
|
33
|
-
AWS.config(credentials)
|
32
|
+
# configure aws credentials. Depending on the called task, this may not be necessary parent task should call #credentials! for validation.
|
33
|
+
AWS.config(credentials) unless @credentials.nil?
|
34
34
|
|
35
35
|
# configure aws region if specified in the eb.yml
|
36
36
|
AWS.config(region: EbConfig.region) unless EbConfig.region.nil?
|
@@ -122,6 +122,9 @@ namespace :eb do
|
|
122
122
|
# the artifact on bamboo. The deploy plan will handle this separately.
|
123
123
|
from_time = Time.now
|
124
124
|
|
125
|
+
# ensure credentials
|
126
|
+
credentials!
|
127
|
+
|
125
128
|
# check package file
|
126
129
|
raise "Package file not found (#{absolute_package_file}). Be sure to run the :package task subsequent to any :deploy attempts." if !File.exists? absolute_package_file
|
127
130
|
|
@@ -219,11 +222,19 @@ namespace :eb do
|
|
219
222
|
puts "Destroy issued to AWS."
|
220
223
|
end
|
221
224
|
|
222
|
-
#
|
223
|
-
def credentials
|
225
|
+
# validate file exists
|
226
|
+
def credentials!
|
227
|
+
raise "\nFailed to load AWS secrets: #{aws_secrets_file}.\nFile contents should look like:\naccess_key_id: XXXX\nsecret_access_key: XXXX\n\n" unless File.exists?(aws_secrets_file)
|
228
|
+
credentials
|
224
229
|
|
225
|
-
|
230
|
+
['access_key_id', 'secret_access_key'].each do |key|
|
231
|
+
value = credentials[key]
|
232
|
+
raise "\nThe #{key} must be specified in the #{aws_secrets_file}.\n\n" if value.nil?
|
233
|
+
end
|
234
|
+
end
|
226
235
|
|
236
|
+
# load from a user directory i.e. ~/.aws.acme.yml
|
237
|
+
def credentials
|
227
238
|
# load secrets from the user home directory
|
228
239
|
@credentials = YAML.safe_load_file(aws_secrets_file) if @credentials.nil?
|
229
240
|
@credentials
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elastic-beanstalk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -185,7 +185,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
185
185
|
version: '0'
|
186
186
|
segments:
|
187
187
|
- 0
|
188
|
-
hash:
|
188
|
+
hash: 2569835408244002675
|
189
189
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
190
190
|
none: false
|
191
191
|
requirements:
|
@@ -194,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
194
194
|
version: '0'
|
195
195
|
segments:
|
196
196
|
- 0
|
197
|
-
hash:
|
197
|
+
hash: 2569835408244002675
|
198
198
|
requirements: []
|
199
199
|
rubyforge_project:
|
200
200
|
rubygems_version: 1.8.25
|