kjuulh
31d7ef27a8
Add bin/docker-traverse.sh Add bin/exec-sanity.sh Add bin/lunardev.sh Add bin/record.sh Add bin/restart-builds-drone.sh Add bin/run-dosier.sh Add bin/sanity.sh Add bin/scan-for-bad-indexes.sh Add bin/ssh-agent.sh Add bin/terraform.sh Add bin/tmux.sh Add bin/update-vault.sh Add bin/zimfwupdate.sh
20 lines
542 B
Bash
20 lines
542 B
Bash
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
drone_url=https://ci.i.kjuulh.io/api/
|
|
auth="Authorization: Bearer z1gpPUNI0dAgxtCqvk1aFhyyRn6S1n05"
|
|
|
|
curl -s "${drone_url}user/repos" -H "$auth" | jq -r .[].slug |
|
|
while read -r repo; do
|
|
echo "processing $repo"
|
|
curl -s "${drone_url}repos/$repo/builds" -H "$auth" | jq -c '.[1:5] | .[] | select(.status | contains("failure")) | .number' | jq -r |
|
|
while read -r build_id; do
|
|
echo "building: $repo - $build_id"
|
|
curl -s -X POST "${drone_url}repos/$repo/builds/$build_id" -H "$auth"
|
|
sleep 1
|
|
done
|
|
done
|
|
|
|
|