From 5b809f9e0e0fe84304c2ae0f5f7b2d4db02565ad Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 10 Feb 2022 21:15:07 +0100 Subject: [PATCH] check-hydra-status.sh: Ignore unfinished builds --- scripts/check-hydra-status.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/check-hydra-status.sh b/scripts/check-hydra-status.sh index 7efe9cf97..5e2f03429 100644 --- a/scripts/check-hydra-status.sh +++ b/scripts/check-hydra-status.sh @@ -16,8 +16,13 @@ someBuildFailed=0 for buildId in $BUILDS_FOR_LATEST_EVAL; do buildInfo=$(curl -sS -H 'Accept: application/json' "https://hydra.nixos.org/build/$buildId") - buildStatus=$(echo "$buildInfo" | \ - jq -r '.buildstatus') + finished=$(echo "$buildInfo" | jq -r '.finished') + + if [[ $finished = 0 ]]; then + continue + fi + + buildStatus=$(echo "$buildInfo" | jq -r '.buildstatus') if [[ $buildStatus != 0 ]]; then someBuildFailed=1