From a862192bc46031f948e3d6f307351dc31e289984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Roth?= Date: Sat, 11 Jan 2025 14:02:24 +0100 Subject: [PATCH] ci: more relaxed aptly upload --- .github/workflows/scripts/upload-artifacts.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scripts/upload-artifacts.sh b/.github/workflows/scripts/upload-artifacts.sh index e81f2e0b..ba0bae32 100755 --- a/.github/workflows/scripts/upload-artifacts.sh +++ b/.github/workflows/scripts/upload-artifacts.sh @@ -67,11 +67,14 @@ cleanup() { } trap cleanup EXIT +sleeptime=5 +retries=60 wait_task() { _id=$1 _success=0 - for t in `seq 180` + sleep $sleeptime + for t in `seq $retries` do jsonret=`curl -fsS -u $aptly_user:$aptly_password ${aptly_api}/api/tasks/$_id` _state=`echo $jsonret | jq .State` @@ -84,7 +87,7 @@ wait_task() echo Error: task failed return 1 fi - sleep 1 + sleep $sleeptime done if [ "$_success" -ne 1 ]; then echo Error: task timeout