View bisect.sh
#!/bin/bash | |
# git bisect job for jenkins, originally by @bashlog | |
GOOD_BUILD=$(curl 'http://jenkins.example.org:8080/job/BUILDNAME/lastStableBuild/api/json' | sed 's:[{},]:\n:g'|grep '"number":'|sed 's/.*://') | |
BAD_BUILD=$(($GOOD_BUILD + 1)) | |
curl -f "http://jenkins.example.org:8080/job/BUILDNAME/$BAD_BUILD/api/json" || BAD_BUILD=$(($GOOD_BUILD + 2)) | |
curl -f "http://jenkins.example.org:8080/job/BUILDNAME/$BAD_BUILD/api/json" || BAD_BUILD=$(($GOOD_BUILD + 3)) | |
curl -f "http://jenkins.example.org:8080/job/BUILDNAME/$BAD_BUILD/api/json" || BAD_BUILD=$(($GOOD_BUILD + 4)) | |
curl -f "http://jenkins.example.org:8080/job/BUILDNAME/$BAD_BUILD/api/json" || BAD_BUILD=$(($GOOD_BUILD + 5)) | |
curl -f "http://jenkins.example.org:8080/job/BUILDNAME/$BAD_BUILD/api/json" || BAD_BUILD=$(($GOOD_BUILD + 6)) |