Skip to content

Commit

Permalink
fix: fix curl in wait-for-job command (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
ankorstore-haddowg authored Apr 28, 2023
1 parent 2868284 commit 80cc84e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scripts/wait-for-job.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ get_job_status() {
local STATUS=""
local NUMBER=""
local WORKFLOW_JOBS_URL="https://circleci.com/api/v2/workflow/$CIRCLE_WORKFLOW_ID/job?circle-token=$CIRCLE_TOKEN"
WORKFLOW_JOBS=$(safeCurl "$WORKFLOW_JOBS_URL" > "$WORKFLOW_JOBS_JSON")
WORKFLOW_JOBS=$(safeCurl "$WORKFLOW_JOBS_URL")
STATUS=$(jq -r ".items[] | select(.name==\"$NAME_OF_JOB\") | .status | values" <<<"$WORKFLOW_JOBS")
NUMBER=$(jq -r ".items[] | select(.name==\"$NAME_OF_JOB\") | .job_number | values" <<<"$WORKFLOW_JOBS")
echo "$STATUS $NUMBER"
Expand Down

0 comments on commit 80cc84e

Please sign in to comment.