tasks: add a rollback task
This commit is contained in:
parent
0738c6ff18
commit
77ab7d1462
1 changed files with 10 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue