uc3-sam-sceptre 0.0.1 → 0.0.2

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: bf7d0e753bbcbfc977d046ad6beee0d8837459749b24c4518b4071e653c2b2d0
4
- data.tar.gz: bf7717c153cc8414bab7e6a79fdf21759358e906525e69823d7a3cbace98f1b3
3
+ metadata.gz: 8daa12905f3990e4c33824a11edc030f69b7166baf06b87f69bd6d79e61ccf14
4
+ data.tar.gz: 1e3e7c42fdcf229e00e7dff93e30fd1ae84ee5fa807169fa3430a6031967b38b
5
5
  SHA512:
6
- metadata.gz: 11a60179364b3915ada6b464a6fa2fea14bbc1f59d6af4fb4e428b8432b4a0785eb2e739210e0703d59d49c277c4e3fd06a48cca7a2560083e40c14d37c799be
7
- data.tar.gz: fbca8e612283e589377a04093427851b2e652403aeb92ce07be76e584ff02fad65ad237007826cbce6ba8cb490fadefca3015d4ca1befd7f87a641a14056a7a8
6
+ metadata.gz: 738b38c44834d8fcf7a72646c45c8c8d6681533fa1b50ae4481089767f4a5024308b22dfc0d8f91466dcd67309a0c797220740021cb35a145fbfb930e71f8e8d
7
+ data.tar.gz: d04e2615d5e6201bce35f3dacd6fb650ba5548e342e895af29bf0e83a5cbdab86f794fc294c1c0cdcca5e95dd4be75a7e09d8244a785f233b39b71b08dda7366
data/README.md CHANGED
@@ -151,7 +151,7 @@ This gem will automatically append the `:program + :service + :subservice + :env
151
151
 
152
152
  #### Build the bundle
153
153
 
154
- You will need to run `bundle install` so that this gem is installed and ready
154
+ You will need to run `bundle config path ./ && bundle install` so that this gem is installed and ready
155
155
 
156
156
  #### Add the Sceptre hook
157
157
 
@@ -171,7 +171,7 @@ parameters:
171
171
  hooks:
172
172
  after_create:
173
173
  # Build the Lambda code and store in the bucket so it is available downstream
174
- - !cmd './templates/lambdas/src/sam_build_deploy.rb'
174
+ - !cmd './templates/lambdas/src/sam_build_deploy.rb true true'
175
175
  ```
176
176
 
177
177
  ### Examples Ruby scripts:
@@ -181,36 +181,40 @@ The following is an example of deploying to a Lambda that is a Docker image into
181
181
 
182
182
  require 'uc3-sam-sceptre'
183
183
 
184
- params = {
185
- service: 'dmp',
186
- subservice: 'hub',
187
- git_repo: 'https://github.com/CDLUC3/dmp-hub-cfn',
188
- stack_suffix: 'docker-lambdas',
189
- admin_email_key: 'AdminEmail',
190
-
191
- ecr_uri_key: 'EcrRepositoryUri',
192
-
193
- fetchable_cf_params: [
194
- { stack_export_name: 'VpcId' },
195
- { stack_export_name: 'SubnetA' },
196
- { stack_export_name: 'SubnetB' },
197
- { stack_export_name: 'SubnetC' },
198
- { stack_export_name: 'DeadLetterQueueArn' },
199
- { stack_export_name: 'LambdaSecGroupId' },
200
- { stack_export_name: 'SnsTopicEmailArn', template_param_name: 'SnsEmailTopicArn' }
201
- { stack_export_name: 'DomainName' },
202
- { stack_export_name: 'RdsHost' },
203
- { stack_export_name: 'RdsPort' },
204
- { stack_export_name: 'RdsDbName' }
205
- ],
206
- static_cf_params: [
207
- { template_param_name: 'Version', value: 'v0' }
208
- ]
209
- }
210
-
211
- proxy = Uc3SamSceptre::Proxy.new(params)
212
- proxy.build
213
- proxy.deploy
184
+ if ARGV.length == 2
185
+ params = {
186
+ service: 'dmp',
187
+ subservice: 'hub',
188
+ git_repo: 'https://github.com/CDLUC3/dmp-hub-cfn',
189
+ stack_suffix: 'docker-lambdas',
190
+ admin_email_key: 'AdminEmail',
191
+
192
+ ecr_uri_key: 'EcrRepositoryUri',
193
+
194
+ fetchable_cf_params: [
195
+ { stack_export_name: 'VpcId' },
196
+ { stack_export_name: 'SubnetA' },
197
+ { stack_export_name: 'SubnetB' },
198
+ { stack_export_name: 'SubnetC' },
199
+ { stack_export_name: 'DeadLetterQueueArn' },
200
+ { stack_export_name: 'LambdaSecGroupId' },
201
+ { stack_export_name: 'SnsTopicEmailArn', template_param_name: 'SnsEmailTopicArn' },
202
+ { stack_export_name: 'DomainName' },
203
+ { stack_export_name: 'RdsHost' },
204
+ { stack_export_name: 'RdsPort' },
205
+ { stack_export_name: 'RdsDbName' }
206
+ ],
207
+ static_cf_params: [
208
+ { template_param_name: 'Version', value: 'v0' }
209
+ ]
210
+ }
211
+
212
+ proxy = Uc3SamSceptre::Proxy.new(params)
213
+ proxy.build if ARGV[0].to_s.downcase.strip == 'true'
214
+ proxy.deploy if ARGV[1].to_s.downcase.strip == 'true'
215
+ else
216
+ p 'Expected 2 arguments: run build? and run deploy? (For example: `ruby sam_build_deploy.rb true true`)'
217
+ end
214
218
  ```
215
219
 
216
220
  The following is an example of deploying a Lambda that is NOT a Docker image into a ZIP archive stored in S3
@@ -219,29 +223,33 @@ The following is an example of deploying a Lambda that is NOT a Docker image int
219
223
 
220
224
  require 'uc3-sam-sceptre'
221
225
 
222
- params = {
223
- service: 'dmp',
224
- subservice: 'hub',
225
- git_repo: 'https://github.com/CDLUC3/dmp-hub-cfn',
226
- ecr_uri_key: 'EcrRepositoryUri',
227
- stack_suffix: 'docker-lambdas',
228
- admin_email_key: 'AdminEmail',
229
-
230
- s3_arn_key: 'S3PrivateBucketArn',
231
-
232
- fetchable_cf_params: [
233
- { stack_export_name: 'CloudFrontDistroId' },
234
- { stack_export_name: 'S3PublicBucketArn' },
235
- { stack_export_name: 'DynamoTableName' },
236
- { stack_export_name: 'SnsTopicEmailArn', template_param_name: 'SnsEmailTopicArn' }
237
- { stack_export_name: 'DomainName' }
238
- ],
239
- static_cf_params: [
240
- { template_param_name: 'Version', value: 'v0' }
241
- ]
242
- }
243
-
244
- proxy = Uc3SamSceptre::Proxy.new(params)
245
- proxy.build
246
- proxy.deploy
226
+ if ARGV.length == 2
227
+ params = {
228
+ service: 'dmp',
229
+ subservice: 'hub',
230
+ git_repo: 'https://github.com/CDLUC3/dmp-hub-cfn',
231
+ ecr_uri_key: 'EcrRepositoryUri',
232
+ stack_suffix: 'docker-lambdas',
233
+ admin_email_key: 'AdminEmail',
234
+
235
+ s3_arn_key: 'S3PrivateBucketArn',
236
+
237
+ fetchable_cf_params: [
238
+ { stack_export_name: 'CloudFrontDistroId' },
239
+ { stack_export_name: 'S3PublicBucketArn' },
240
+ { stack_export_name: 'DynamoTableName' },
241
+ { stack_export_name: 'SnsTopicEmailArn', template_param_name: 'SnsEmailTopicArn' },
242
+ { stack_export_name: 'DomainName' }
243
+ ],
244
+ static_cf_params: [
245
+ { template_param_name: 'Version', value: 'v0' }
246
+ ]
247
+ }
248
+
249
+ proxy = Uc3SamSceptre::Proxy.new(params)
250
+ proxy.build if ARGV[0].to_s.downcase.strip == 'true'
251
+ proxy.deploy if ARGV[1].to_s.downcase.strip == 'true'
252
+ else
253
+ p 'Expected 2 arguments: run build? and run deploy? (For example: `ruby sam_build_deploy.rb true true`)'
254
+ end
247
255
  ```
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3SamSceptre
4
- VERSION = '0.0.1'
4
+ VERSION = '0.0.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uc3-sam-sceptre
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley
@@ -11,7 +11,7 @@ cert_chain: []
11
11
  date: 2023-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: aws-sdk-s3cloudformation
14
+ name: aws-sdk-cloudformation
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"