2024-06-13 22:36:20 -07:00
|
|
|
#!/bin/sh
|
|
|
|
TOKEN=$(curl -s -L "https://public.ecr.aws/token?service=public.ecr.aws&scope=repository:q9t5s3a7/vllm-ci-test-repo:pull" | jq -r .token)
|
|
|
|
URL="https://public.ecr.aws/v2/q9t5s3a7/vllm-ci-test-repo/manifests/$BUILDKITE_COMMIT"
|
|
|
|
|
2024-09-16 14:30:02 -07:00
|
|
|
TIMEOUT_SECONDS=10
|
|
|
|
|
2024-06-13 22:36:20 -07:00
|
|
|
retries=0
|
|
|
|
while [ $retries -lt 1000 ]; do
|
2024-11-07 13:17:29 -05:00
|
|
|
if [ "$(curl -s --max-time "$TIMEOUT_SECONDS" -L -H "Authorization: Bearer $TOKEN" -o /dev/null -w "%{http_code}" "$URL")" -eq 200 ]; then
|
2024-06-13 22:36:20 -07:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Waiting for image to be available..."
|
|
|
|
|
|
|
|
retries=$((retries + 1))
|
|
|
|
sleep 5
|
|
|
|
done
|
|
|
|
|
2024-11-07 13:17:29 -05:00
|
|
|
exit 1
|