Merge pull request #5160 from betagouv/rollback-all-the-things

Tasks : ajout d'une tâche pour déclencher un rollback
This commit is contained in:
Keirua 2020-05-18 13:32:57 +02:00 committed by GitHub
commit a5be836a55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,3 +32,13 @@ task :post_deploy do
sh "mina post_deploy domain=#{domains.first} branch=#{branch}"
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