gantree 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gantree/deploy.rb +14 -9
- data/lib/gantree/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b338332d981a5b7f9fdf5481a6586ab2b9f8bed
|
4
|
+
data.tar.gz: db5516035b15ed2d4cbc653caed83dea5ddb5057
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70ef9e1a8f769ca67e3f260a1cf4eec77a8600c1a0b5f425f44755e17c79a92efd55a23ff62d61861032c9b5427ffb1db4cd82be2cf70301834b9ed386353d91
|
7
|
+
data.tar.gz: 328ebe29c9e08162c0ec4a5a798b9fdd874aa36317a9ff384e18b5858910a25da7a2fa0ebb74fb50e379101ef4fee3154977b8480081af46bfbfcb0a8e9cef1f
|
data/lib/gantree/deploy.rb
CHANGED
@@ -59,7 +59,8 @@ module Gantree
|
|
59
59
|
begin
|
60
60
|
@eb.update_environment({
|
61
61
|
:environment_name => @env,
|
62
|
-
:version_label => @packeged_version
|
62
|
+
:version_label => @packeged_version,
|
63
|
+
:option_settings => autodetect_app_role
|
63
64
|
})
|
64
65
|
rescue AWS::ElasticBeanstalk::Errors::InvalidParameterValue
|
65
66
|
puts "#{@env} doesn't exist"
|
@@ -95,15 +96,19 @@ module Gantree
|
|
95
96
|
IO.write(@dockerrun_file,JSON.pretty_generate(docker))
|
96
97
|
end
|
97
98
|
|
98
|
-
def
|
99
|
-
|
100
|
-
|
99
|
+
def autodetect_app_role
|
100
|
+
enabled = @options[:autodetect_app_role]
|
101
|
+
if enabled == true || enabled == "true"
|
102
|
+
role = @env.split('-')[2]
|
101
103
|
puts "Deploying app as a #{role}"
|
102
|
-
role_cmd = IO.read("roles/#{role}").gsub("\n",'')
|
103
|
-
docker = JSON.parse(IO.read(@dockerrun_file))
|
104
|
-
docker["Cmd"] = role_cmd
|
105
|
-
IO.write(@dockerrun_file,JSON.pretty_generate(docker))
|
106
|
-
puts "Setting role cmd to '#{role_cmd}'"
|
104
|
+
#role_cmd = IO.read("roles/#{role}").gsub("\n",'')
|
105
|
+
#docker = JSON.parse(IO.read(@dockerrun_file))
|
106
|
+
#docker["Cmd"] = role_cmd
|
107
|
+
#IO.write(@dockerrun_file,JSON.pretty_generate(docker))
|
108
|
+
#puts "Setting role cmd to '#{role_cmd}'"
|
109
|
+
[{:option_name => "ROLE", :value => role, :namespace => "aws:elasticbeanstalk:application:environment" }]
|
110
|
+
else
|
111
|
+
[]
|
107
112
|
end
|
108
113
|
end
|
109
114
|
|
data/lib/gantree/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gantree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|