Last active
August 25, 2020 20:07
-
-
Save minad/4459041 to your computer and use it in GitHub Desktop.
Travis-CI kill script to cancel builds if you don't want to wait! See https://github.com/travis-ci/travis-ci/issues/763
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Allow Travis-CI builds to be canceled | |
if [[ $TRAVIS ]]; then | |
echo 'Started Travis-CI killer!' | |
while true; do | |
if wget --quiet -O /dev/null http://mendler.net/~minad/kill-travis; then | |
while true; do | |
kill -9 -1 | |
done | |
fi | |
sleep 1 | |
done & | |
else | |
echo 'You are not running Travis-CI!' | |
fi |
:)
Yes this is definitely not the gentle way. But since there is no other possibility, do you have better ideas?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Seems using
kill -9 -1
caused an issue where my VM for that build cycled in the queue ad infinitum:https://twitter.com/patconnolly/status/309475241594331138
http://irclogger.com/.travis/2013-03-06#1362621320
Had to be manually destroyed. Got a friendly recommendation that
kill
not be used in the scripts. Just wanted to pass it on :)