fix(ci): make docker push retry more aggressive against Gitea registry
CI / Build Native (push) Failing after 9m10s
CI / Build Native (push) Failing after 9m10s
The Gitea registry sometimes returns 'net/http: timeout awaiting response headers' on blob uploads. The existing retry loop (3x15s) isn't enough. - Bump retries 3 -> 5 - Backoff 15s -> 30s - --max-concurrent-uploads=1 to avoid hammering a small registry Total worst-case wait: ~4 minutes (4 retries * 30s + 5 pushes ~ 30s).
This commit is contained in:
@@ -90,14 +90,14 @@ jobs:
|
||||
push_with_retry() {
|
||||
local ref="$1"
|
||||
local attempt=1
|
||||
local max_attempts=3
|
||||
local max_attempts=5
|
||||
while [ $attempt -le $max_attempts ]; do
|
||||
echo "=== Push (attempt $attempt/$max_attempts): $ref ==="
|
||||
if docker push "$ref"; then
|
||||
if docker push --max-concurrent-uploads=1 "$ref"; then
|
||||
return 0
|
||||
fi
|
||||
echo "::warning::Push of $ref failed, retrying in 15s..."
|
||||
sleep 15
|
||||
echo "::warning::Push of $ref failed, retrying in 30s..."
|
||||
sleep 30
|
||||
attempt=$((attempt + 1))
|
||||
done
|
||||
echo "::error::Push of $ref failed after $max_attempts attempts"
|
||||
|
||||
Reference in New Issue
Block a user