aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-02-10 21:15:07 +0100
committerEelco Dolstra <edolstra@gmail.com>2022-02-10 21:15:07 +0100
commit5b809f9e0e0fe84304c2ae0f5f7b2d4db02565ad (patch)
tree3c2839163ab92bc40197c097e43c144f57dedc42
parentb8d57e28839587832109f6607eb28819559fc30c (diff)
check-hydra-status.sh: Ignore unfinished builds
-rw-r--r--scripts/check-hydra-status.sh9
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