Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to kill an heroku build that is in progress?

I accidentally pushed a build that does an npm install in the postinstall script. This has led to my heroku app being stuck in an infinite install loop. I searched the heroku documentation on how to kill builds but came up blank. The closest thing I found was https://help.heroku.com/Z44Q4WW4/how-do-i-stop-a-release-phase and I tried killing as per those instructions but my build won't die :(

like image 673
jbccollins Avatar asked Jun 21 '18 14:06

jbccollins


People also ask

How do I stop a heroku deploy?

To monitor your Release Phase processes as they execute, you can use the CLI command heroku ps -a YOUR_APP_NAME . as these are normal processes, you can use the ps:kill and ps:scale commands to stop the Release Phase from completing, which in turn, will prevent the latest release from completing.


2 Answers

If you have a build going into production right now and need to stop it quickly:

heroku plugins:install heroku-builds
heroku builds:cancel -a YOUR_HEROKU_APP_NAME
like image 161
raine Avatar answered Oct 19 '22 03:10

raine


The heroku-builds CLI plugin (heroku plugins:install heroku-builds) has a command which will stop a running build:

$ heroku builds:cancel -a your-app-name

All builds will time out too after a time that can go between 15 minutes to 1 hour.

like image 62
Damien MATHIEU Avatar answered Oct 19 '22 03:10

Damien MATHIEU