panoramix 0.7.12 → 0.7.13
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/panoramix/plugin/cfn.rb +13 -11
- metadata +14 -14
data/lib/panoramix/plugin/cfn.rb
CHANGED
@@ -41,12 +41,12 @@ module Panoramix
|
|
41
41
|
choose do |menu|
|
42
42
|
menu.prompt = "Would you like to delete the stack #{gen_stack_name}? "
|
43
43
|
|
44
|
-
menu.choice(:No) do
|
45
|
-
say("Don't do it again!")
|
44
|
+
menu.choice(:No) do
|
45
|
+
say("Don't do it again!")
|
46
46
|
return false
|
47
47
|
end
|
48
|
-
menu.choices(:Yes) do
|
49
|
-
resp = ask("Warning, this action can not be reversed. Do you want to continue? (Yes/No)".red, String) do |q|
|
48
|
+
menu.choices(:Yes) do
|
49
|
+
resp = ask("Warning, this action can not be reversed. Do you want to continue? (Yes/No)".red, String) do |q|
|
50
50
|
q.default = "No"
|
51
51
|
end
|
52
52
|
return resp == "Yes"
|
@@ -57,8 +57,10 @@ module Panoramix
|
|
57
57
|
def question
|
58
58
|
case @stage
|
59
59
|
when "pro"
|
60
|
+
return true if ENV['CFN_FORCE_DELETE']
|
60
61
|
return ask_pro
|
61
62
|
when "pre"
|
63
|
+
return true if ENV['CFN_FORCE_DELETE']
|
62
64
|
return ask_pro
|
63
65
|
when "test"
|
64
66
|
return true
|
@@ -109,23 +111,23 @@ module Panoramix
|
|
109
111
|
end
|
110
112
|
|
111
113
|
# Match every parameter with an environment variable
|
112
|
-
def fill_env path
|
114
|
+
def fill_env path
|
113
115
|
file = File.read path
|
114
116
|
json = JSON.parse file
|
115
|
-
|
116
|
-
env = Hash.new
|
117
|
+
|
118
|
+
env = Hash.new
|
117
119
|
json["Parameters"].each do |k,v|
|
118
120
|
env[k] = @params["default"][k] ? @params["default"][k] : nil
|
119
121
|
env[k] = @params[@stage][k] ? @params[@stage][k] : env[k]
|
120
122
|
env[k] = ENV[k] ? ENV[k] : env[k]
|
121
|
-
raise "Parameter or environment variable #{k} not defined" unless env[k]
|
123
|
+
raise "Parameter or environment variable #{k} not defined" unless env[k]
|
122
124
|
end
|
123
|
-
env
|
125
|
+
env
|
124
126
|
end
|
125
127
|
|
126
128
|
# Wait until the stack is being created
|
127
129
|
def wait_for_creation stack_id
|
128
|
-
loop do
|
130
|
+
loop do
|
129
131
|
status = shell("aws cloudformation describe-stacks --stack #{stack_id} --query Stacks[0].StackStatus --output text", true)[:out].strip
|
130
132
|
raise "Creation Failed" if status == "CREATE_FAILED"
|
131
133
|
break if status != "CREATE_IN_PROGRESS"
|
@@ -243,4 +245,4 @@ end
|
|
243
245
|
["pro", "pre", "dev", "test"].each do |stage|
|
244
246
|
end
|
245
247
|
end
|
246
|
-
=end
|
248
|
+
=end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: panoramix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.13
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-02-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: pry
|
@@ -113,25 +113,25 @@ executables: []
|
|
113
113
|
extensions: []
|
114
114
|
extra_rdoc_files: []
|
115
115
|
files:
|
116
|
-
- lib/panoramix.rb
|
117
|
-
- lib/panoramix/
|
118
|
-
- lib/panoramix/
|
116
|
+
- lib/panoramix/dsl.rb
|
117
|
+
- lib/panoramix/tasks/global_tasks.rb
|
118
|
+
- lib/panoramix/tasks/task_mpi.rb
|
119
|
+
- lib/panoramix/tasks/actions.rb
|
119
120
|
- lib/panoramix/plugin/docker_image.rb
|
120
|
-
- lib/panoramix/plugin/docker_up.rb
|
121
|
-
- lib/panoramix/plugin/s3.rb
|
122
|
-
- lib/panoramix/plugin/git.rb
|
123
121
|
- lib/panoramix/plugin/base.rb
|
124
122
|
- lib/panoramix/plugin/env.rb
|
125
|
-
- lib/panoramix/plugin/docker_build.rb
|
126
123
|
- lib/panoramix/plugin/docker_image_base.rb
|
124
|
+
- lib/panoramix/plugin/docker_up.rb
|
125
|
+
- lib/panoramix/plugin/docker_build.rb
|
126
|
+
- lib/panoramix/plugin/s3.rb
|
127
|
+
- lib/panoramix/plugin/cfn.rb
|
128
|
+
- lib/panoramix/plugin/git.rb
|
127
129
|
- lib/panoramix/plugin/wget.rb
|
128
|
-
- lib/panoramix/
|
129
|
-
- lib/panoramix/external.rb
|
130
|
-
- lib/panoramix/tasks/task_mpi.rb
|
131
|
-
- lib/panoramix/tasks/global_tasks.rb
|
132
|
-
- lib/panoramix/tasks/actions.rb
|
130
|
+
- lib/panoramix/locale.rb
|
133
131
|
- lib/panoramix/mpi.rb
|
132
|
+
- lib/panoramix/external.rb
|
134
133
|
- lib/panoramix/panoramix_core.rb
|
134
|
+
- lib/panoramix.rb
|
135
135
|
- locales/en.yml
|
136
136
|
homepage: https://github.com/sflyr
|
137
137
|
licenses:
|