minimal_pipeline 0.0.21 → 0.1.0
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.
- checksums.yaml +4 -4
- data/lib/minimal_pipeline/cloudformation.rb +11 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ffb984c98ca6bbe57bfe8f08801869e44c3dfc7fca52d25497726ea39ba91d68
|
4
|
+
data.tar.gz: 4db5f2f7ff27711223742cc5b6e6d35a85854b2bfcf285b2113139f3e5ac902c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93af2bdadcdfdeec3b9b3f47ffc7694a5790710e365507c420a0f74448169d8aec1dff90cd75647d1885a8b1929e6eb834bfc36dbdbb7a9b733e2c188e8e1d87
|
7
|
+
data.tar.gz: b344ee7101cee0f5c99c90ecc538d7bb91582e713a525a59f688082c128cd3a1e51d75650e4c1836c19e072bfa613faf1b3987777d9708a7d9215f43be543172
|
@@ -8,21 +8,14 @@ class MinimalPipeline
|
|
8
8
|
# ```
|
9
9
|
# cloudformation = MinimalPipeline::Cloudformation.new
|
10
10
|
#
|
11
|
-
#
|
11
|
+
# parameters = {
|
12
12
|
# 'Vpc' => 'vpc-123456',
|
13
13
|
# 'AsgSubnets' => %w[sg-one sg-two sg-three],
|
14
14
|
# 'ElbSecurityGroup' => 'sg-123456',
|
15
15
|
# 'CertName' => 'example'
|
16
16
|
# }
|
17
17
|
#
|
18
|
-
#
|
19
|
-
# stack_name: stack_name,
|
20
|
-
# template_body: File.read('provisioning/elb.json'),
|
21
|
-
# capabilities: ['CAPABILITY_IAM'],
|
22
|
-
# parameters: cloudformation.params(cloudformation_parameters)
|
23
|
-
# }
|
24
|
-
#
|
25
|
-
# cloudformation.deploy_stack('EXAMPLE_ELB', stack_parameters)
|
18
|
+
# cloudformation.deploy_stack('EXAMPLE_ELB', parameters, 'stack.yaml')
|
26
19
|
# name = cloudformation.stack_output(stack_name, 'LoadBalancerName')
|
27
20
|
# ```
|
28
21
|
#
|
@@ -101,12 +94,20 @@ class MinimalPipeline
|
|
101
94
|
|
102
95
|
# @param stack_name [String] The name of the CloudFormation stack
|
103
96
|
# @param stack_parameters [Hash] Parameters to be passed into the stack
|
104
|
-
def deploy_stack(stack_name,
|
97
|
+
def deploy_stack(stack_name, parameters, template,
|
98
|
+
capabilities = ['CAPABILITY_IAM'])
|
105
99
|
wait_options = {
|
106
100
|
max_attempts: @wait_max_attempts,
|
107
101
|
delay: @wait_delay
|
108
102
|
}
|
109
103
|
|
104
|
+
stack_parameters = {
|
105
|
+
stack_name: stack_name,
|
106
|
+
template_body: File.read(template),
|
107
|
+
capabilities: capabilities,
|
108
|
+
parameters: params(parameters)
|
109
|
+
}
|
110
|
+
|
110
111
|
unless @client.describe_stacks(stack_name: stack_name).stacks.empty?
|
111
112
|
puts 'Updating the existing stack' if ENV['DEBUG']
|
112
113
|
@client.update_stack(stack_parameters)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minimal_pipeline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mayowa Aladeojebi
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-10-
|
12
|
+
date: 2018-10-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk
|