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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 13433e060e399e18006097478df3dba3c89b1a66
4
- data.tar.gz: 04efbbc1d2386239ec7f53c1c1f1b770e5bfb04c
3
+ metadata.gz: 51663b89314b7d02bc842466e778ff8c1a542e84
4
+ data.tar.gz: e6dc9c956e04953a9fe0d1459a3c937dcf53c144
5
5
  SHA512:
6
- metadata.gz: 302c48fb0c0813d5834b11e202e5b43bc15e2e8ee876ad2109bfc37ffa7b47eedfbdd15cf351436526c6c65408b6b73a0736e4ff3fa7d10afc4686033951d49c
7
- data.tar.gz: 20c0f1a68695b64bd95c1badb9bbe8a963a444ae176ccc2e56c88334205a8e642f3cd3133151158c90170ecb0b38435592b6d893d6f2bf656a71430758c68010
6
+ metadata.gz: 7ecdad4c54dbfb6067e74ea180f79864eb67418a858a9e32f2e89df5b1fdb747fe398f5b448e85deb70ac7834a4cee05a589c1ec002cacc58a4af1c2cefca520
7
+ data.tar.gz: 09a0ae1388fc3634ffd6bfe7cb51f0db986daf033bf9c307e43a612ae319fb798c05106255d9ef9833ad61e599787b91dd23b00cfede94fa4d068fe8b020b2c4
@@ -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[:environments][0][:application_name]
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
@@ -1,3 +1,3 @@
1
1
  module Gantree
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
@@ -8,12 +8,13 @@ require 'spec_helper'
8
8
  describe Gantree::CLI do
9
9
  before(:all) do
10
10
 
11
- @app = "stag-knarr-app-s1"
12
- @env = "knarr-stag-s1"
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 Environment: knarr-stag-s1")
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: stag-knarr-app-s1")
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 Environment: knarr-stag-s1")
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 Environment: knarr-stag-s1")
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: knarr-stag-s1"
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 knarr-stag-s2 --dupe #{@env} --dry-run")
91
- expect(out).to include "dupe: knarr-stag-s1"
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gantree
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix