37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# File 'lib/ufo/stack.rb', line 37
def deploy
@stack = find_stack(@stack_name)
if @stack && rollback_complete?(@stack)
puts "Existing stack in ROLLBACK_COMPLETE state. Deleting stack before continuing."
cloudformation.delete_stack(stack_name: @stack_name)
status.wait
status.reset
@stack = nil end
exit_with_message(@stack) if @stack && !updatable?(@stack)
@stack ? perform(:update) : perform(:create)
stop_old_tasks if @options[:stop_old_task]
return unless @options[:wait]
status.wait
puts status.rollback_error_message if status.update_rollback?
status.success?
end
|