diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-02-10 21:15:07 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-02-10 21:15:07 +0100 |
commit | 5b809f9e0e0fe84304c2ae0f5f7b2d4db02565ad (patch) | |
tree | 3c2839163ab92bc40197c097e43c144f57dedc42 /scripts | |
parent | b8d57e28839587832109f6607eb28819559fc30c (diff) |
check-hydra-status.sh: Ignore unfinished builds
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/check-hydra-status.sh | 9 |
1 files 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 |