tasks: add a rollback task

This commit is contained in:
Pierre de La Morinerie 2020-05-14 14:11:00 +00:00
parent 0738c6ff18
commit 77ab7d1462

View file

@ -32,3 +32,13 @@ task :post_deploy do
sh "mina post_deploy domain=#{domains.first} branch=#{branch}" sh "mina post_deploy domain=#{domains.first} branch=#{branch}"
end end
task :rollback do
domains = domains_for_stage(ENV.fetch('STAGE'))
branch = ENV.fetch('BRANCH')
domains.each do |domain|
sh "mina rollback domain=#{domain} branch=#{branch}"
sh "mina service:restart_puma domain=#{domain} branch=#{branch}"
end
end