From 01cc7e40268bd17aab229821c083dd90ff58d0cd Mon Sep 17 00:00:00 2001 From: Gregory Haddow <93638800+ankorstore-haddowg@users.noreply.github.com> Date: Thu, 30 Mar 2023 15:16:37 +0100 Subject: [PATCH] chore(cancel-redundant-workflows): tidy output from cancellations (#32) --- src/scripts/cancel-redundant-workflows.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scripts/cancel-redundant-workflows.sh b/src/scripts/cancel-redundant-workflows.sh index 5752624..9b169fe 100755 --- a/src/scripts/cancel-redundant-workflows.sh +++ b/src/scripts/cancel-redundant-workflows.sh @@ -40,9 +40,11 @@ fi if [ -s /tmp/aks/wf_to_cancel ]; then echo "Cancelling the following redundant \`$WORKFLOW_NAME\` workflow(s):" cat /tmp/aks/wf_to_cancel + echo "" while read -r WORKFLOW_ID; do - curl -f -s --retry 3 --retry-all-errors --header "Circle-Token: $CIRCLE_TOKEN" --request POST "https://circleci.com/api/v2/workflow/$WORKFLOW_ID/cancel" + curl -f -s -o /dev/null --retry 3 --retry-all-errors --header "Circle-Token: $CIRCLE_TOKEN" --request POST "https://circleci.com/api/v2/workflow/$WORKFLOW_ID/cancel" + echo "Cancelled: $WORKFLOW_ID" done < /tmp/aks/wf_to_cancel else echo "Nothing to cancel"