github actions: upload delays 30s, retries 3

Do less retries but with higher delay. Previous config didn't work.
This commit is contained in:
Leonid Pliushch 2021-10-08 23:24:30 +03:00
parent 6d9e53b510
commit b8b89471f5
No known key found for this signature in database
GPG Key ID: 45F2964132545795
1 changed files with 8 additions and 8 deletions

View File

@ -223,9 +223,9 @@ jobs:
if [ "$uploaded_files" = "true" ]; then
echo "[$(date +%H:%M:%S)] Adding packages to repository '$REPOSITORY_NAME'..."
# Retry up to 5 times.
# Retry up to 3 times.
http_status_code=""
for _ in {1..10}; do
for _ in {1..3}; do
curl_response=$(
set +e
curl \
@ -239,8 +239,8 @@ jobs:
http_status_code=$(echo "$curl_response" | cut -d'|' -f2)
if [ "$http_status_code" = "000" ]; then
echo "[$(date +%H:%M:%S)] Warning: server/proxy has dropped connection, retrying in 10s (adding packages)..."
sleep 10
echo "[$(date +%H:%M:%S)] Warning: server/proxy has dropped connection, retrying in 30s (adding packages)..."
sleep 30
continue
else
break
@ -264,9 +264,9 @@ jobs:
# Final part to make changes appear in web root.
echo "[$(date +%H:%M:%S)] Publishing repository changes..."
# Retry up to 5 times.
# Retry up to 3 times.
http_status_code=""
for _ in {1..10}; do
for _ in {1..3}; do
curl_response=$(
set +e
curl \
@ -282,8 +282,8 @@ jobs:
http_status_code=$(echo "$curl_response" | cut -d'|' -f2)
if [ "$http_status_code" = "000" ]; then
echo "[$(date +%H:%M:%S)] Warning: server/proxy has dropped connection, retrying in 10s (publishing changes)..."
sleep 10
echo "[$(date +%H:%M:%S)] Warning: server/proxy has dropped connection, retrying in 30s (publishing changes)..."
sleep 30
continue
else
break