firespring_dev_commands 2.1.1.pre.alpha.4 → 2.1.1.pre.alpha.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e54929040a40491ff1d2b36af03da9c718e2770a507cf29f62ab7b24993b8d8
|
4
|
+
data.tar.gz: da2feb3080c1864f22b988b9898a08408c874e29251be018b7f82f7290d5a922
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd65f5fb950c89f42cbb761c39241a0f6fd414f99c22e3b8ae6800bc1361ba46b104dd70e1a890477789db04750d14ab8529db53be96e8917f16d4424b2daa46
|
7
|
+
data.tar.gz: 85dd595b1e98265d75c41d24d3a98e72dbafa4d1fd112a04849d37061441251e5018a8295ab38486ccc78622052af98c0e111c0fc3498bf221d06072703be3b7
|
@@ -69,6 +69,13 @@ module Dev
|
|
69
69
|
@state = FAILED
|
70
70
|
end
|
71
71
|
|
72
|
+
# Get the cloudformation stack
|
73
|
+
def exist?
|
74
|
+
!client.describe_stacks(stack_name: name).stacks.empty?
|
75
|
+
rescue ::Aws::CloudFormation::Errors::ValidationError
|
76
|
+
false
|
77
|
+
end
|
78
|
+
|
72
79
|
# Update the cloudformation stack
|
73
80
|
def update(should_wait: true)
|
74
81
|
# Call upload function to get the s3 url
|
@@ -31,6 +31,8 @@ module Dev
|
|
31
31
|
|
32
32
|
# Start create on all stacks without waiting so they are created in parallel
|
33
33
|
cloudformations.each do |cloudformation|
|
34
|
+
next if cloudformation.exist?
|
35
|
+
|
34
36
|
cloudformation.create(should_wait: false)
|
35
37
|
end
|
36
38
|
LOG.info 'Waiting for all stacks to finish create'
|
@@ -62,6 +64,8 @@ module Dev
|
|
62
64
|
|
63
65
|
# Start update on all stacks without waiting so they are updated in parallel
|
64
66
|
cloudformations.each do |cloudformation|
|
67
|
+
next unless cloudformation.exist?
|
68
|
+
|
65
69
|
cloudformation.update(should_wait: false)
|
66
70
|
end
|
67
71
|
LOG.info 'Waiting for all stacks to finish update'
|
@@ -93,6 +97,8 @@ module Dev
|
|
93
97
|
|
94
98
|
# Start delete on all stacks without waiting so they are deleted in parallel
|
95
99
|
cloudformations.each do |cloudformation|
|
100
|
+
next unless cloudformation.exist?
|
101
|
+
|
96
102
|
cloudformation.delete(should_wait: false)
|
97
103
|
end
|
98
104
|
LOG.info 'Waiting for all stacks to finish delete'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: firespring_dev_commands
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.1.pre.alpha.
|
4
|
+
version: 2.1.1.pre.alpha.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Firespring
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-08-
|
11
|
+
date: 2023-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|