Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ApolloBot2 committed Jul 12, 2024
1 parent a61414c commit b572252
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -513,4 +513,28 @@ commands:
- run:
name: Check Intel Mac test completed successfully
command: |
exit 1
max_attempts=40
attempt=0
echo SHA is $CIRCLE_SHA1
while [ $attempt -lt $max_attempts ]; do
RESULT=`curl -s -H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/apollographql/federation-rs/actions/runs?head_sha=$CIRCLE_SHA1" | jq -r '.workflow_runs[].conclusion'`
echo "Attempt $((attempt+1)) of $max_attempts: RESULT is $RESULT"
if [ "$RESULT" == "success" ]; then
echo "Success condition met."
exit 0 # Success exit code
elif [ "$RESULT" == "failure" ]; then
echo "Failure condition detected."
exit 1 # Failure exit code
fi
attempt=$((attempt + 1))
sleep 15 # Wait for 15 seconds before the next check
done
echo "Maximum attempts reached without success."
exit 1 # Indicates failure to meet success condition within the allowed attempts

0 comments on commit b572252

Please sign in to comment.