From eef2650a5fd62b1dd3c1d7caae23ad079cbc1fa3 Mon Sep 17 00:00:00 2001 From: eversC Date: Fri, 17 Nov 2023 18:27:49 +0000 Subject: [PATCH] Add debug --- scripts/ci_concurrency.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/ci_concurrency.sh b/scripts/ci_concurrency.sh index 1eb33dd4..cf87ef5a 100644 --- a/scripts/ci_concurrency.sh +++ b/scripts/ci_concurrency.sh @@ -28,9 +28,10 @@ while true ; do echo "failed to get CI workflows with status ${STATUS}" WAIT=true # if the count of workflows is 1, that's the current workflow we're running in - elif [ "${COUNT}" -gt "1" ] ; then + elif [ "${COUNT}" -gt "0" ] ; then RUN_IDS=$(curl "${CURL_OPTS[@]}" -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${GITHUB_TOKEN}" "${API_CALL_URL}?status=${STATUS}" | jq -r '.workflow_runs[] | .id' || true) for RUN_ID in $RUN_IDS ; do + echo "Checking run (id: ${RUN_ID}) for in_progress e2e_tests" API_CALL_URL_JOBS=https://api.github.com/repos/ovotech/cloud-key-rotator/actions/runs/$RUN_ID JOB_NAME_STATII=$(curl "${CURL_OPTS[@]}" -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${GITHUB_TOKEN}" "${API_CALL_URL_JOBS}" | jq -r '.jobs[] | .name,.status' || true) for JOB_NAME_STATUS in $JOB_NAME_STATII; do