CI: rework way how upload will be retried

* Allow 3 attempts for uploading.

* Add 30 second delay between attempts.
This commit is contained in:
Leonid Pliushch 2019-07-21 17:31:46 +03:00
parent 26e6bf1781
commit aa98b2bc4d

View File

@ -106,9 +106,13 @@ if ! $DO_UPLOAD; then
./build-package.sh -a "$TERMUX_ARCH" -I $PACKAGE_NAMES
else
echo "[*] Uploading packages to Bintray:"
if ! ./scripts/package_uploader.sh -p "${PWD}/debs" $PACKAGE_NAMES; then
echo "[*] Uploading packages to Bintray (retry):"
./scripts/package_uploader.sh -p "${PWD}/debs" $PACKAGE_NAMES
for attempt in 1 2 3; do
echo "[*] Uploading packages to Bintray:"
if ./scripts/package_uploader.sh -p "${PWD}/debs" $PACKAGE_NAMES; then
break
else
echo "[!] Failure, retrying in 30 seconds..."
sleep 30
fi
fi
fi