mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-21 12:57:40 +00:00
ci: more relaxed aptly upload
This commit is contained in:
@@ -67,11 +67,14 @@ cleanup() {
|
|||||||
}
|
}
|
||||||
trap cleanup EXIT
|
trap cleanup EXIT
|
||||||
|
|
||||||
|
sleeptime=5
|
||||||
|
retries=60
|
||||||
wait_task()
|
wait_task()
|
||||||
{
|
{
|
||||||
_id=$1
|
_id=$1
|
||||||
_success=0
|
_success=0
|
||||||
for t in `seq 180`
|
sleep $sleeptime
|
||||||
|
for t in `seq $retries`
|
||||||
do
|
do
|
||||||
jsonret=`curl -fsS -u $aptly_user:$aptly_password ${aptly_api}/api/tasks/$_id`
|
jsonret=`curl -fsS -u $aptly_user:$aptly_password ${aptly_api}/api/tasks/$_id`
|
||||||
_state=`echo $jsonret | jq .State`
|
_state=`echo $jsonret | jq .State`
|
||||||
@@ -84,7 +87,7 @@ wait_task()
|
|||||||
echo Error: task failed
|
echo Error: task failed
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep $sleeptime
|
||||||
done
|
done
|
||||||
if [ "$_success" -ne 1 ]; then
|
if [ "$_success" -ne 1 ]; then
|
||||||
echo Error: task timeout
|
echo Error: task timeout
|
||||||
|
|||||||
Reference in New Issue
Block a user