eb_deployer 0.0.3 → 0.0.4
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.
@@ -17,10 +17,6 @@ module EbDeployer
|
|
17
17
|
transform_output_to_settings(transforms)
|
18
18
|
end
|
19
19
|
|
20
|
-
def output(key)
|
21
|
-
stack.outputs.find { |o| o.key == key }.try(:value)
|
22
|
-
end
|
23
|
-
|
24
20
|
private
|
25
21
|
|
26
22
|
def update_stack(template, params)
|
@@ -59,6 +55,10 @@ module EbDeployer
|
|
59
55
|
end while !SUCCESS_STATS.include?(stats)
|
60
56
|
end
|
61
57
|
|
58
|
+
def output(key)
|
59
|
+
stack.outputs.find { |o| o.key == key }.try(:value)
|
60
|
+
end
|
61
|
+
|
62
62
|
def extract_params
|
63
63
|
Hash[ENV.map {|k, v| k =~ /^AWSRESOURCES_(.*)/ ? [$1, v] : nil }.compact]
|
64
64
|
end
|
data/lib/eb_deployer/version.rb
CHANGED
data/test/deploy_test.rb
CHANGED
@@ -19,9 +19,9 @@ class DeployTest < Minitest::Test
|
|
19
19
|
|
20
20
|
|
21
21
|
def test_first_deployment_create_environment
|
22
|
-
assert !@eb_driver.environment_exists?('simple', 'production')
|
22
|
+
assert !@eb_driver.environment_exists?('simple', 'simple-production')
|
23
23
|
deploy(:application => 'simple', :environment => "production")
|
24
|
-
assert @eb_driver.environment_exists?('simple', 'production')
|
24
|
+
assert @eb_driver.environment_exists?('simple', 'simple-production')
|
25
25
|
end
|
26
26
|
|
27
27
|
|
@@ -29,20 +29,20 @@ class DeployTest < Minitest::Test
|
|
29
29
|
deploy(:application => 'simple',
|
30
30
|
:environment => "production",
|
31
31
|
:version_label => 1)
|
32
|
-
assert_equal '1', @eb_driver.environment_verion_label('simple', 'production')
|
32
|
+
assert_equal '1', @eb_driver.environment_verion_label('simple', 'simple-production')
|
33
33
|
|
34
34
|
deploy(:application => 'simple',
|
35
35
|
:environment => "production",
|
36
36
|
:version_label => 2)
|
37
37
|
|
38
|
-
assert_equal '2', @eb_driver.environment_verion_label('simple', 'production')
|
38
|
+
assert_equal '2', @eb_driver.environment_verion_label('simple', 'simple-production')
|
39
39
|
end
|
40
40
|
|
41
41
|
def test_default_cname_that_deployed_should_app_env_name
|
42
42
|
deploy(:application => 'simple',
|
43
43
|
:environment => "production",
|
44
44
|
:version_label => 42)
|
45
|
-
assert_equal "simple-production", @eb_driver.environment_cname_prefix('simple', 'production')
|
45
|
+
assert_equal "simple-production", @eb_driver.environment_cname_prefix('simple', 'simple-production')
|
46
46
|
end
|
47
47
|
|
48
48
|
def test_cname_prefix_can_be_override
|
@@ -50,7 +50,7 @@ class DeployTest < Minitest::Test
|
|
50
50
|
:environment => "production",
|
51
51
|
:cname_prefix => 'sports123',
|
52
52
|
:version_label => 42)
|
53
|
-
assert_equal "sports123", @eb_driver.environment_cname_prefix('simple', 'production')
|
53
|
+
assert_equal "sports123", @eb_driver.environment_cname_prefix('simple', 'simple-production')
|
54
54
|
end
|
55
55
|
|
56
56
|
|
@@ -81,8 +81,8 @@ class DeployTest < Minitest::Test
|
|
81
81
|
:strategy => 'blue_green',
|
82
82
|
:version_label => 42)
|
83
83
|
|
84
|
-
assert @eb_driver.environment_exists?('simple', 'production-blue')
|
85
|
-
assert_equal 'simple-production', @eb_driver.environment_cname_prefix('simple', 'production-blue')
|
84
|
+
assert @eb_driver.environment_exists?('simple', 'simple-production-blue')
|
85
|
+
assert_equal 'simple-production', @eb_driver.environment_cname_prefix('simple', 'simple-production-blue')
|
86
86
|
end
|
87
87
|
|
88
88
|
|
@@ -97,8 +97,8 @@ class DeployTest < Minitest::Test
|
|
97
97
|
:strategy => 'blue_green',
|
98
98
|
:version_label => 43)
|
99
99
|
|
100
|
-
assert @eb_driver.environment_exists?('simple', 'production-blue')
|
101
|
-
assert @eb_driver.environment_exists?('simple', 'production-green')
|
100
|
+
assert @eb_driver.environment_exists?('simple', 'simple-production-blue')
|
101
|
+
assert @eb_driver.environment_exists?('simple', 'simple-production-green')
|
102
102
|
end
|
103
103
|
|
104
104
|
|
@@ -113,9 +113,9 @@ class DeployTest < Minitest::Test
|
|
113
113
|
:strategy => 'blue_green',
|
114
114
|
:version_label => 43)
|
115
115
|
|
116
|
-
assert_match(/simple-production-inactive/, @eb_driver.environment_cname_prefix('simple', 'production-blue'))
|
116
|
+
assert_match(/simple-production-inactive/, @eb_driver.environment_cname_prefix('simple', 'simple-production-blue'))
|
117
117
|
|
118
|
-
assert_equal 'simple-production', @eb_driver.environment_cname_prefix('simple', 'production-green')
|
118
|
+
assert_equal 'simple-production', @eb_driver.environment_cname_prefix('simple', 'simple-production-green')
|
119
119
|
|
120
120
|
|
121
121
|
deploy(:application => 'simple',
|
@@ -123,9 +123,9 @@ class DeployTest < Minitest::Test
|
|
123
123
|
:strategy => 'blue_green',
|
124
124
|
:version_label => 44)
|
125
125
|
|
126
|
-
assert_match(/simple-production-inactive/, @eb_driver.environment_cname_prefix('simple', 'production-green'))
|
126
|
+
assert_match(/simple-production-inactive/, @eb_driver.environment_cname_prefix('simple', 'simple-production-green'))
|
127
127
|
|
128
|
-
assert_equal 'simple-production', @eb_driver.environment_cname_prefix('simple', 'production-blue')
|
128
|
+
assert_equal 'simple-production', @eb_driver.environment_cname_prefix('simple', 'simple-production-blue')
|
129
129
|
end
|
130
130
|
|
131
131
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eb_deployer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-06-
|
13
|
+
date: 2013-06-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: aws-sdk
|