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 +4 -4
- data/lib/uc3-sam-sceptre/version.rb +1 -1
- data/lib/uc3-sam-sceptre.rb +17 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32b327c9a7d6940d11f3de18f55e1ae6c61507b09f66eb4f27113f2fd6667a8f
|
4
|
+
data.tar.gz: b90be4b3fa2d7734a7fd22dd8e28953c54c32f157b018044c98e0b0d14b0c6d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6075ea1fdf2c3d7926de9e1724260b7eb28399ad8f0f66f960f78a7ce9125db974853ce30c75d9c45777f74bf8c2d6f608250d1b9601b356f9e8f346ca0b575
|
7
|
+
data.tar.gz: 3c4226af364977c5de5bb4c8b079547bddf9914dbad03dc0ac991a4adb7b6db277e1d7ebc23f73add5caeafc73f2b39456ab8a94ae5eb908f1574c4968c53085
|
data/lib/uc3-sam-sceptre.rb
CHANGED
@@ -66,12 +66,8 @@ module Uc3SamSceptre
|
|
66
66
|
|
67
67
|
# Run a SAM deploy
|
68
68
|
def deploy(guided: false)
|
69
|
-
args =
|
70
|
-
|
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 = [
|