gantree 0.4.1 → 0.4.2
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.
- checksums.yaml +4 -4
- data/lib/gantree/deploy.rb +4 -3
- data/lib/gantree/version.rb +1 -1
- data/spec/lib/gantree/cli_spec.rb +10 -9
- 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: 51663b89314b7d02bc842466e778ff8c1a542e84
|
4
|
+
data.tar.gz: e6dc9c956e04953a9fe0d1459a3c937dcf53c144
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ecdad4c54dbfb6067e74ea180f79864eb67418a858a9e32f2e89df5b1fdb747fe398f5b448e85deb70ac7834a4cee05a589c1ec002cacc58a4af1c2cefca520
|
7
|
+
data.tar.gz: 09a0ae1388fc3634ffd6bfe7cb51f0db986daf033bf9c307e43a612ae319fb798c05106255d9ef9833ad61e599787b91dd23b00cfede94fa4d068fe8b020b2c4
|
data/lib/gantree/deploy.rb
CHANGED
@@ -59,12 +59,12 @@ module Gantree
|
|
59
59
|
end
|
60
60
|
|
61
61
|
def environment?
|
62
|
-
results = eb.describe_environments({ environment_names: ["#{@name}"]})
|
62
|
+
results = eb.describe_environments({ environment_names: ["#{@name}"]})[:environments]
|
63
63
|
if results.length == 0
|
64
64
|
puts "ERROR: Environment '#{name}' not found"
|
65
65
|
exit 1
|
66
66
|
else
|
67
|
-
@app = results[
|
67
|
+
@app = results[0][:application_name]
|
68
68
|
return true
|
69
69
|
end
|
70
70
|
end
|
@@ -78,7 +78,8 @@ module Gantree
|
|
78
78
|
create_eb_version
|
79
79
|
update_application(envs)
|
80
80
|
if @options[:slack]
|
81
|
-
msg = "#{ENV['USER']} is deploying #{@packaged_version} to #{@app}"
|
81
|
+
msg = "#{ENV['USER']} is deploying #{@packaged_version} to #{@app} "
|
82
|
+
msg += "Tag: #{@options[:tag]}" if @options[:tag]
|
82
83
|
Notification.new(@options[:slack]).say(msg) unless @options[:silent]
|
83
84
|
end
|
84
85
|
end
|
data/lib/gantree/version.rb
CHANGED
@@ -8,12 +8,13 @@ require 'spec_helper'
|
|
8
8
|
describe Gantree::CLI do
|
9
9
|
before(:all) do
|
10
10
|
|
11
|
-
@app = "stag-
|
12
|
-
@env = "
|
11
|
+
@app = "stag-cms-app-s2"
|
12
|
+
@env = "cms-stag-s2"
|
13
13
|
@owner = "bleacher"
|
14
14
|
@repo = "cauldron"
|
15
15
|
@tag = "master"
|
16
16
|
@user = "feelobot"
|
17
|
+
@new_env = "cms-stag-s3"
|
17
18
|
end
|
18
19
|
|
19
20
|
describe "init" do
|
@@ -40,14 +41,14 @@ describe Gantree::CLI do
|
|
40
41
|
it "should deploy images" do
|
41
42
|
execute("bin/gantree init #{@owner}/#{@repo}:#{@tag} --dry-run")
|
42
43
|
out = execute("bin/gantree deploy #{@env} --dry-run --silent")
|
43
|
-
expect(out).to include("Found
|
44
|
+
expect(out).to include("Found Application: #{@env}")
|
44
45
|
expect(out).to include("dry_run: dry_run")
|
45
46
|
expect(out).to include("silent: silent")
|
46
47
|
end
|
47
48
|
|
48
49
|
it "should deploy images with remote extensions" do
|
49
50
|
out = execute("bin/gantree deploy #{@app} -x 'git@github.com:br/.ebextensions' --dry-run --silent")
|
50
|
-
expect(out).to include("Found Environment:
|
51
|
+
expect(out).to include("Found Environment: #{@app}")
|
51
52
|
expect(out).to include("ext: git@github.com:br/.ebextensions")
|
52
53
|
expect(out).to include("dry_run: dry_run")
|
53
54
|
expect(out).to include("silent: silent")
|
@@ -55,7 +56,7 @@ describe Gantree::CLI do
|
|
55
56
|
|
56
57
|
it "should deploy images with remote extensions on a branch" do
|
57
58
|
out = execute("bin/gantree deploy #{@env} -x 'git@github.com:br/.ebextensions:basic' --dry-run --silent")
|
58
|
-
expect(out).to include("Found
|
59
|
+
expect(out).to include("Found Application: #{@env}")
|
59
60
|
expect(out).to include("ext: git@github.com:br/.ebextensions:basic")
|
60
61
|
expect(out).to include("dry_run: dry_run")
|
61
62
|
expect(out).to include("silent: silent")
|
@@ -63,7 +64,7 @@ describe Gantree::CLI do
|
|
63
64
|
|
64
65
|
it "should notify slack of deploys" do
|
65
66
|
out = execute("bin/gantree deploy #{@env} --dry-run")
|
66
|
-
expect(out).to include("Found
|
67
|
+
expect(out).to include("Found Application: #{@env}")
|
67
68
|
end
|
68
69
|
end
|
69
70
|
|
@@ -71,7 +72,7 @@ describe Gantree::CLI do
|
|
71
72
|
it "should create clusters" do
|
72
73
|
out = execute("bin/gantree create #{@env} --dry-run")
|
73
74
|
expect(out).to include "instance_size: m3.medium"
|
74
|
-
expect(out).to include "stack_name:
|
75
|
+
expect(out).to include "stack_name: #{@env}"
|
75
76
|
expect(out).to include "cfn_bucket: br-templates"
|
76
77
|
end
|
77
78
|
|
@@ -87,8 +88,8 @@ describe Gantree::CLI do
|
|
87
88
|
end
|
88
89
|
|
89
90
|
it "should create dupliacte clusters from local cfn" do
|
90
|
-
out = execute("bin/gantree create
|
91
|
-
expect(out).to include "dupe:
|
91
|
+
out = execute("bin/gantree create #{@new_env} --dupe #{@env} --dry-run")
|
92
|
+
expect(out).to include "dupe: #{@env}"
|
92
93
|
end
|
93
94
|
end
|
94
95
|
|