Created
August 20, 2014 12:42
-
-
Save rodrigozrusso/5e9e319a9a62787bcb88 to your computer and use it in GitHub Desktop.
This file contains 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
#Bring back a Jenkins node thread from the ashes | |
# to use: export JENKINS_USERNAME="" and export JENKINS_PASSWORD="" | |
# Enjoy! | |
JENKINS_URL="http://localhost:8080"; | |
NODE_PREFIX="ND-"; | |
for ((node=1;node<=10;node++)); | |
do | |
NODE_NAME=`printf "%s%02d" $NODE_PREFIX $node` | |
echo "Node number: ${NODE_NAME}"; | |
for ((thread=0;thread<10;thread++)); | |
do | |
echo "Thread number: ${thread}"; | |
curl -X POST "${JENKINS_URL}/computer/${NODE_NAME}/executors/${thread}/yank" --user ${JENKINS_USERNAME}:${JENKINS_PASSWORD}; | |
done; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment