Skip to content

Commit

Permalink
chore(cancel-redundant-workflows): tidy output from cancellations (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
ankorstore-haddowg authored Mar 30, 2023
1 parent 5292270 commit 01cc7e4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/scripts/cancel-redundant-workflows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 01cc7e4

Please sign in to comment.