uc3-sam-sceptre 0.0.23 → 0.0.25

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: 9230e8af4509b1ecedfd90149e37a64281e9a4d3370ce70eb4ed44844564c171
4
- data.tar.gz: 253a029c8c74bec21ad2e887425385239c4e75f71f0224c769c7feec6e885328
3
+ metadata.gz: 32b327c9a7d6940d11f3de18f55e1ae6c61507b09f66eb4f27113f2fd6667a8f
4
+ data.tar.gz: b90be4b3fa2d7734a7fd22dd8e28953c54c32f157b018044c98e0b0d14b0c6d3
5
5
  SHA512:
6
- metadata.gz: aa08208deea06584fbaee4a9f82b3fe610614a9be92ff906d47066bf1c269f498a65d8f1ca66c854cd6b85363395ccb43482fd8603db217de508f4872f3839b0
7
- data.tar.gz: d9e10dfc54da69755417e67bd266caa03661e77cd6d96c34d54a7ec5a7c9d5019b50e08880617a63d4fe610a5d743bcef9551d8d857628cb2629dc737dbe2a1c
6
+ metadata.gz: b6075ea1fdf2c3d7926de9e1724260b7eb28399ad8f0f66f960f78a7ce9125db974853ce30c75d9c45777f74bf8c2d6f608250d1b9601b356f9e8f346ca0b575
7
+ data.tar.gz: 3c4226af364977c5de5bb4c8b079547bddf9914dbad03dc0ac991a4adb7b6db277e1d7ebc23f73add5caeafc73f2b39456ab8a94ae5eb908f1574c4968c53085
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3SamSceptre
4
- VERSION = '0.0.23'
4
+ VERSION = '0.0.25'
5
5
  end
@@ -66,12 +66,8 @@ module Uc3SamSceptre
66
66
 
67
67
  # Run a SAM deploy
68
68
  def deploy(guided: false)
69
- args = [
70
- "--stack-name #{@stack_name}",
71
- "--confirm-changeset #{!@auto}",
72
- '--capabilities CAPABILITY_NAMED_IAM',
73
- '--disable-rollback false'
74
- ]
69
+ args = _base_args
70
+
75
71
  # Add the S3 or ECR details depending on what we're working with
76
72
  args << "--s3-bucket #{_locate_value(key: @s3_arn_key)&.gsub('arn:aws:s3:::', '')}" unless @s3_arn_key.nil?
77
73
  args << "--s3-prefix #{@stack_name}" unless @s3_arn_key.nil?
@@ -80,14 +76,26 @@ module Uc3SamSceptre
80
76
  args << "--guided" if guided
81
77
  args << "--tags #{_sam_tags(admin_email: _locate_value(key: @admin_email_key)).join(' ')}"
82
78
  args << "--parameter-overrides #{_build_deploy_overrides.join(' ')}"
83
-
84
- pp args
85
-
86
79
  system "sam deploy #{args.join(' ')}"
87
80
  end
88
81
 
82
+ # Run a SAM delete
83
+ def delete
84
+ args = _base_args
85
+ system "sam delete #{args.join(' ')}"
86
+ end
87
+
89
88
  private
90
89
 
90
+ def _base_args
91
+ [
92
+ "--stack-name #{@stack_name}",
93
+ "--confirm-changeset #{!@auto}",
94
+ '--capabilities CAPABILITY_NAMED_IAM',
95
+ '--disable-rollback false'
96
+ ]
97
+ end
98
+
91
99
  # Construct the AWS tags that SAM will use when building resources
92
100
  def _sam_tags(admin_email: nil)
93
101
  tags = [
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.23
4
+ version: 0.0.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley