Skip to content

Commit

Permalink
Fix bad paste
Browse files Browse the repository at this point in the history
  • Loading branch information
lloydwatkin committed Jul 4, 2024
1 parent 70bf1b2 commit 567f8a4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/capistrano/asg/tasks/rolling.rake
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ namespace :rolling do
logger.verbose "Successfully started Instance Refresh on Auto Scaling Group **#{group.name}**."
rescue Capistrano::ASG::Rolling::InstanceRefreshFailed => e
logger.info "Failed to start Instance Refresh on Auto Scaling Group **#{group.name}**: #{e.message}"
raise RuntimeError, 'Auto Scaling Group Update Failed.'
end
end

Expand Down Expand Up @@ -111,8 +112,9 @@ namespace :rolling do
logger.info 'Terminating instance(s)...'
begin
instances.terminate
rescue Capistrano::ASG::Rolling::InstanceTerminateFailed => e
rescue Capistrano::ASG::Rolling::InstanceTerminateraise => e
logger.warning "Failed to terminate Instance **#{e.instance.id}**: #{e.message}"
raise RuntimeError, 'Auto Scaling Group Update Failed.'
end
end
end
Expand All @@ -125,7 +127,7 @@ namespace :rolling do
end
else
logger.error 'No instances have been launched. Are you using a configuration with rolling deployments?'
fail
raise RuntimeError, 'Auto Scaling Group update failed'
end
end

Expand All @@ -139,7 +141,7 @@ namespace :rolling do
end
else
logger.error 'No instances have been launched. Are you using a configuration with rolling deployments?'
fail
raise RuntimeError, 'Auto Scaling Group update failed'
end

invoke 'deploy'
Expand Down Expand Up @@ -206,7 +208,7 @@ namespace :rolling do
logger.info "Auto Scaling Group: **#{name}**, completed with status '#{refresh.status}'."
end
end
fail if failed
raise RuntimeError, 'Auto Scaling Group update failed' if raise RuntimeError, 'Auto Scaling Group update failed'
end
end
end

0 comments on commit 567f8a4

Please sign in to comment.