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.
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.