ops_tasks 0.1.3 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ops_tasks/version.rb +1 -1
- data/lib/tasks/ops_tasks.rake +13 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5aa650488646eed721ef0c1898c2dc51c0f91438
|
4
|
+
data.tar.gz: a8c42dc2aa985f2af9a25ab646125de9d2820d87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a90d9cb495cea9a065a925124ac095a6c39806346b8f17a468082fca8eab020d43aad82bf4ca2f8997e51a1040f045dd99454efb057c2c2a138ef9d4d47bd009
|
7
|
+
data.tar.gz: 165dfb8ac2f3ff8161de56daf88549c212f8ddc900dccf76e385c8d094b7ff4512133bc698b1cbbd1a446f2a0cee30fcd7d22264ec9645de431933da7ae259af
|
data/lib/ops_tasks/version.rb
CHANGED
data/lib/tasks/ops_tasks.rake
CHANGED
@@ -45,13 +45,20 @@ namespace :production do
|
|
45
45
|
end
|
46
46
|
|
47
47
|
task :deploy => :environment do |t, args|
|
48
|
-
|
48
|
+
servers = ENV.keys.select{|k| k.match(/_stack/) && !k.match(/FIGARO/)}.map{|k| k.match(/(.+)_stack_id/)[1]}
|
49
|
+
say("\nSelect a server...")
|
50
|
+
choose do |menu|
|
51
|
+
servers.each do |server|
|
52
|
+
menu.choice server do @server_type = server end
|
53
|
+
end
|
54
|
+
menu.choice "quit" do exit end
|
55
|
+
end
|
49
56
|
@deployment = OpsTasks::Deployment.new(
|
50
|
-
layer_id: ENV["#{server_type}_layer_id"],
|
51
|
-
stack_id: ENV["#{server_type}_stack_id"],
|
52
|
-
recipe: ENV["#{server_type}_deploy_recipe"],
|
53
|
-
project: ENV["#{server_type}_project_name"],
|
54
|
-
room: ENV["#{server_type}_slack_channel"]
|
57
|
+
layer_id: ENV["#{@server_type}_layer_id"],
|
58
|
+
stack_id: ENV["#{@server_type}_stack_id"],
|
59
|
+
recipe: ENV["#{@server_type}_deploy_recipe"],
|
60
|
+
project: ENV["#{@server_type}_project_name"],
|
61
|
+
room: ENV["#{@server_type}_slack_channel"]
|
55
62
|
)
|
56
63
|
deploy_id = @deployment.deploy
|
57
64
|
@deployment.wait_for_completion(deploy_id)
|