simple_deploy 0.5.4 → 0.5.5
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.
- data/CHANGELOG +5 -0
- data/lib/simple_deploy/cli/deploy.rb +1 -0
- data/lib/simple_deploy/notifier.rb +5 -0
- data/lib/simple_deploy/stack.rb +5 -0
- data/lib/simple_deploy/version.rb +1 -1
- data/spec/cli/deploy_spec.rb +3 -0
- data/spec/notifier_spec.rb +10 -1
- data/spec/stack_spec.rb +1 -1
- metadata +2 -2
data/CHANGELOG
CHANGED
@@ -67,6 +67,7 @@ EOS
|
|
67
67
|
|
68
68
|
stack.update :force => opts[:force], :attributes => new_attributes if new_attributes.any?
|
69
69
|
|
70
|
+
notifier.send_deployment_start_message unless opts[:quiet]
|
70
71
|
if stack.deploy opts[:force]
|
71
72
|
notifier.send_deployment_complete_message unless opts[:quiet]
|
72
73
|
else
|
@@ -10,6 +10,11 @@ module SimpleDeploy
|
|
10
10
|
@notifications = @config.notifications || {}
|
11
11
|
end
|
12
12
|
|
13
|
+
def send_deployment_start_message
|
14
|
+
message = "Deployment to #{@stack_name} started."
|
15
|
+
send message
|
16
|
+
end
|
17
|
+
|
13
18
|
def send_deployment_complete_message
|
14
19
|
message = "Deployment to #{@stack_name} complete."
|
15
20
|
attributes = stack.attributes
|
data/lib/simple_deploy/stack.rb
CHANGED
@@ -23,6 +23,11 @@ module SimpleDeploy
|
|
23
23
|
def update(args)
|
24
24
|
if !deployment.clear_for_deployment? && args[:force]
|
25
25
|
deployment.clear_deployment_lock true
|
26
|
+
|
27
|
+
Backoff.exp_periods do |p|
|
28
|
+
sleep p
|
29
|
+
break if deployment.clear_for_deployment?
|
30
|
+
end
|
26
31
|
end
|
27
32
|
|
28
33
|
if deployment.clear_for_deployment?
|
data/spec/cli/deploy_spec.rb
CHANGED
@@ -41,6 +41,7 @@ describe SimpleDeploy::CLI::Deploy do
|
|
41
41
|
and_return(@stack)
|
42
42
|
|
43
43
|
@stack.should_receive(:deploy).with(true).and_return(true)
|
44
|
+
@notifier.should_receive(:send_deployment_start_message)
|
44
45
|
@notifier.should_receive(:send_deployment_complete_message)
|
45
46
|
|
46
47
|
subject.deploy
|
@@ -74,6 +75,7 @@ describe SimpleDeploy::CLI::Deploy do
|
|
74
75
|
and_return(@stack)
|
75
76
|
|
76
77
|
@stack.should_receive(:deploy).with(true).and_return(false)
|
78
|
+
@notifier.should_receive(:send_deployment_start_message)
|
77
79
|
|
78
80
|
begin
|
79
81
|
subject.deploy
|
@@ -110,6 +112,7 @@ describe SimpleDeploy::CLI::Deploy do
|
|
110
112
|
|
111
113
|
@stack.should_receive(:update).with(hash_including(:force => true, :attributes => [{'foo' => 'bah'}]))
|
112
114
|
@stack.should_receive(:deploy).with(true).and_return(true)
|
115
|
+
@notifier.should_receive(:send_deployment_start_message)
|
113
116
|
@notifier.should_receive(:send_deployment_complete_message)
|
114
117
|
|
115
118
|
subject.deploy
|
data/spec/notifier_spec.rb
CHANGED
@@ -20,7 +20,16 @@ describe SimpleDeploy do
|
|
20
20
|
:logger => @logger_mock
|
21
21
|
end
|
22
22
|
|
23
|
-
it "should
|
23
|
+
it "should support a basic start message" do
|
24
|
+
campfire_mock = mock 'campfire mock'
|
25
|
+
|
26
|
+
SimpleDeploy::Notifier::Campfire.should_receive(:new).and_return campfire_mock
|
27
|
+
campfire_mock.should_receive(:send).with "Deployment to stack_name started."
|
28
|
+
|
29
|
+
@notifier.send_deployment_start_message
|
30
|
+
end
|
31
|
+
|
32
|
+
it "should include the github app & chef links in the completed message" do
|
24
33
|
stack_mock = mock 'stack'
|
25
34
|
campfire_mock = mock 'campfire mock'
|
26
35
|
environment_mock = mock 'environment mock'
|
data/spec/stack_spec.rb
CHANGED
@@ -95,7 +95,7 @@ describe SimpleDeploy do
|
|
95
95
|
|
96
96
|
it "should update when the deployment is locked and force is set true" do
|
97
97
|
deployment_mock = mock 'deployment'
|
98
|
-
deployment_mock.should_receive(:clear_for_deployment?).and_return(false, true)
|
98
|
+
deployment_mock.should_receive(:clear_for_deployment?).and_return(false, true, true)
|
99
99
|
deployment_mock.should_receive(:clear_deployment_lock).with(true)
|
100
100
|
@stack.stub(:deployment).and_return(deployment_mock)
|
101
101
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|