From 064ced488356ca2ecfd4a05da6556fbaa36ebb05 Mon Sep 17 00:00:00 2001 From: Gregory Haddow Date: Thu, 9 Mar 2023 14:14:00 +0000 Subject: [PATCH] fix: fix wait-for-job and alter its defaults --- src/commands/wait-for-job.yml | 2 +- src/scripts/wait-for-job.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/wait-for-job.yml b/src/commands/wait-for-job.yml index 9f340b2..bd75f42 100644 --- a/src/commands/wait-for-job.yml +++ b/src/commands/wait-for-job.yml @@ -13,7 +13,7 @@ parameters: For multiple jobs the list must be comma separated. type: string continue-on-timeout: - default: true + default: false description: If true and wait time exceeds the max wait time, completes and lets future steps continue type: boolean max-wait-time: diff --git a/src/scripts/wait-for-job.sh b/src/scripts/wait-for-job.sh index 79a2827..6cd2dda 100755 --- a/src/scripts/wait-for-job.sh +++ b/src/scripts/wait-for-job.sh @@ -21,7 +21,7 @@ get_job_status() { local WORKFLOW_JOBS_JSON="/tmp/aks/wf_$CIRCLE_WORKFLOW_ID.json" curl -f -s --retry 3 "$WORKFLOW_JOBS_URL" > "$WORKFLOW_JOBS_JSON" STATUS=$(jq -r ".items[] | select(.name==\"$NAME_OF_JOB\") | .status | values" "$WORKFLOW_JOBS_JSON") - NUMBER=$(jq -r ".items[] | select(.name==\"$NAME_OF_JOB\") | .JOB_NUMBER | values" "$WORKFLOW_JOBS_JSON") + NUMBER=$(jq -r ".items[] | select(.name==\"$NAME_OF_JOB\") | .job_number | values" "$WORKFLOW_JOBS_JSON") echo "$STATUS $NUMBER" }