Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop deployment to Heroku in progress

Is it possible to stop a deploy to Heroku (git push heroku) that is currently being built?

Something like heroku run stopit!

Btw. rolling back after successful deploy is not what I'm looking for.

like image 635
Ole Henrik Skogstrøm Avatar asked Jan 31 '17 14:01

Ole Henrik Skogstrøm


People also ask

How do I stop heroku process?

If you wish to stop a running one-off dyno, use heroku ps:stop with its name. A one-off dyno will not stop if you issue heroku ps:restart on your application.

How do I set the release phase in heroku?

Use the heroku ps command to see your release command running. The dyno type can be set using `heroku ps:type release={type}, but only after the release phase is run for the first time.

How do I know if heroku deploys?

How to check your app. To run Production Check, navigate to your app in the Heroku Dashboard, click the actions menu in the top-right corner, and then click Production check . Production Check will run a series of tests on your app. These tests are recommended for maintaining and monitoring availability.

Does heroku have continuous deployment?

Heroku provides a variety of continuous delivery tools to help you deploy effortlessly and safely: Pipelines make it easy to maintain separate staging and production environments for your app. Review apps let you try out a GitHub pull request's changes in an isolated and disposable environment.


1 Answers

First, install the Heroku builds plugin:

heroku plugins:install heroku-builds 

Then, to cancel a build, fetch the list of the recent builds:

heroku builds -a YOUR_APP_NAME 

The first line of the output will be your currently running build, the first column is the build ID.

Cancel it with:

heroku builds:cancel BUILD_ID -a YOUR_APP_NAME 

Et voilà, this will force fail the build.

Note: you could also get the build id from the build log URL.

like image 146
Elias Dorneles Avatar answered Sep 24 '22 10:09

Elias Dorneles