Compare commits
2 commits
7ef2b04e83
...
ebb81d337d
Author | SHA1 | Date | |
---|---|---|---|
|
ebb81d337d | ||
b4020d23f8 |
1 changed files with 5 additions and 3 deletions
|
@ -59,15 +59,17 @@ wait_for_hydra () {
|
||||||
local counter
|
local counter
|
||||||
counter=0
|
counter=0
|
||||||
git_rev="$(git -C "${1}/nixfiles" rev-parse update-inputs)"
|
git_rev="$(git -C "${1}/nixfiles" rev-parse update-inputs)"
|
||||||
while true; do
|
while [[ $counter -lt 180 ]]; do
|
||||||
|
counter=$((counter +1))
|
||||||
hydra_rev="$(curl -s -L -H "Accept: application/json" "${2}/evals" | jq -r '.evals | max_by(.id) | .flake' | sed -E "s/.+&rev=(.*)/\1/g")"
|
hydra_rev="$(curl -s -L -H "Accept: application/json" "${2}/evals" | jq -r '.evals | max_by(.id) | .flake' | sed -E "s/.+&rev=(.*)/\1/g")"
|
||||||
if [[ "${git_rev}" == "${hydra_rev}" ]]; then
|
if [[ "${git_rev}" == "${hydra_rev}" ]]; then
|
||||||
echo "Hydra got new commit"
|
echo "Hydra got new commit"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
sleep 30
|
sleep 5
|
||||||
done
|
done
|
||||||
if [[ $counter -ge 30 ]]; then
|
|
||||||
|
if [[ $counter -ge 180 ]]; then
|
||||||
echo "Hydra no workey"
|
echo "Hydra no workey"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue