capify-ec2 1.4.3.pre6 → 1.4.3.pre7

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.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 1.4.3.pre7 (Apr 11, 2013)
2
+
3
+ Bugfixes:
4
+
5
+ - Exit with status 1 when encountering rolling deployment errors, afer displaying the deployment status overview.
6
+
1
7
  ## 1.4.3.pre6 (Apr 9, 2013)
2
8
 
3
9
  Bugfixes:
@@ -103,12 +103,12 @@ Capistrano::Configuration.instance(:must_exist).load do
103
103
  puts "[Capify-EC2] Beginning deployment to #{instance_dns_with_name_tag(server_dns)} with #{server_roles.count > 1 ? 'roles' : 'role'} '#{server_roles.join(', ')}'...".bold
104
104
 
105
105
  load_balancer_to_reregister = capify_ec2.deregister_instance_from_elb_by_dns(server_dns) if is_load_balanced
106
-
106
+
107
107
  # Call the standard 'cap deploy' task with our redefined role containing a single server.
108
108
  top.deploy.default
109
109
 
110
110
  server_roles.each do |a_role|
111
-
111
+
112
112
  # If healthcheck(s) are defined for this role, run them.
113
113
  if all_roles[a_role][:options][:healthcheck]
114
114
  healthchecks_for_role = [ all_roles[a_role][:options][:healthcheck] ].flatten
@@ -156,17 +156,27 @@ Capistrano::Configuration.instance(:must_exist).load do
156
156
  puts "[Capify-EC2] Deployment aborted due to error: #{e}!".red.bold
157
157
  puts "[Capify-EC2]" if load_balancer_to_reregister
158
158
  puts "[Capify-EC2] Note: Instance '#{instance_dns_with_name_tag(e.dns)}' was removed from the ELB '#{load_balancer_to_reregister.id}' and should be manually checked and reregistered.".red.bold if load_balancer_to_reregister
159
+
160
+ rolling_deploy_status(all_servers, successful_deploys, failed_deploys)
161
+ exit 1
159
162
  rescue => e
160
163
  failed_deploys << roles.values.first.servers.first.host
161
164
  puts "[Capify-EC2]"
162
165
  puts "[Capify-EC2] Deployment aborted due to error: #{e}!".red.bold
163
166
  puts "[Capify-EC2]" if load_balancer_to_reregister
164
167
  puts "[Capify-EC2] Note: Instance '#{instance_dns_with_name_tag(roles.values.first.servers.first.host)}' was removed from the ELB '#{load_balancer_to_reregister.id}' and should be manually checked and reregistered.".red.bold if load_balancer_to_reregister
168
+
169
+ rolling_deploy_status(all_servers, successful_deploys, failed_deploys)
170
+ exit 1
165
171
  else
166
172
  puts "[Capify-EC2]"
167
173
  puts "[Capify-EC2] Rolling deployment completed.".green.bold
174
+
175
+ rolling_deploy_status(all_servers, successful_deploys, failed_deploys)
168
176
  end
177
+ end
169
178
 
179
+ def rolling_deploy_status(all_servers, successful_deploys, failed_deploys)
170
180
  puts "[Capify-EC2]"
171
181
  puts "[Capify-EC2] Successful servers:"
172
182
  format_rolling_deploy_results( all_servers, successful_deploys )
@@ -1,6 +1,6 @@
1
1
  module Capify
2
2
  module Ec2
3
- VERSION = "1.4.3.pre6"
3
+ VERSION = "1.4.3.pre7"
4
4
  end
5
5
  end
6
6
 
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capify-ec2
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1467290077
4
+ hash: -3784201798
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 1
8
8
  - 4
9
9
  - 3
10
10
  - pre
11
- - 6
12
- version: 1.4.3.pre6
11
+ - 7
12
+ version: 1.4.3.pre7
13
13
  platform: ruby
14
14
  authors:
15
15
  - Noah Cantor
@@ -20,7 +20,7 @@ autorequire:
20
20
  bindir: bin
21
21
  cert_chain: []
22
22
 
23
- date: 2013-04-09 00:00:00 Z
23
+ date: 2013-04-11 00:00:00 Z
24
24
  dependencies:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: fog