panoramix 0.7.5 → 0.7.6
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.
- data/lib/panoramix/plugin/cfn.rb +7 -2
- metadata +1 -1
data/lib/panoramix/plugin/cfn.rb
CHANGED
@@ -73,7 +73,6 @@ module Panoramix
|
|
73
73
|
|
74
74
|
# Has this stacks already been created
|
75
75
|
def created?
|
76
|
-
return @created if @created
|
77
76
|
# Get a list af all created Stacks
|
78
77
|
query = shell("aws cloudformation describe-stacks --query 'Stacks[*].{StackName:StackName, CreationTime:CreationTime}'", true)[:out]
|
79
78
|
parsed_stacks = JSON.parse query
|
@@ -92,6 +91,10 @@ module Panoramix
|
|
92
91
|
--stack-name #{stack_name}"
|
93
92
|
|
94
93
|
shell(cmd)
|
94
|
+
# Wait until the stack is being deleted
|
95
|
+
loop do
|
96
|
+
break if !created?
|
97
|
+
end
|
95
98
|
end
|
96
99
|
|
97
100
|
# When this instance needs to be executed
|
@@ -124,6 +127,7 @@ module Panoramix
|
|
124
127
|
end
|
125
128
|
end
|
126
129
|
|
130
|
+
# Check wether the file exists
|
127
131
|
def validate_file path
|
128
132
|
# Raise error if the file does not exist
|
129
133
|
unless File.exists? path
|
@@ -212,10 +216,11 @@ def cfn(args, &block)
|
|
212
216
|
descriptions = I18n.t('cfn')
|
213
217
|
descriptions = Hash.new if descriptions.class != Hash
|
214
218
|
|
215
|
-
# Merge deps with the cloudformation file task
|
219
|
+
# Merge deps with the cloudformation template file task
|
216
220
|
prerequisites = deps.select { |d| ! d.is_a? Hash }
|
217
221
|
prerequisites = prerequisites.push(template)
|
218
222
|
|
223
|
+
# Create a task for each version
|
219
224
|
["blue", "green"].each do |version|
|
220
225
|
# Create a task inside each development stage namespace
|
221
226
|
["pro", "pre", "dev", "test"].each do |stage|
|