From c18beff6c0412d53873b5f7a265a0ba04e035001 Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Mon, 22 Jul 2019 22:38:32 +0300 Subject: [PATCH] CI: better implementation for workaround introduced in f75cb1d4f2 Use predefined upload delays for each pipe. --- .cirrus.yml | 4 ++++ scripts/build/ci/cirrus-ci_dispatcher.sh | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 037562fe7..db64d5d42 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -33,24 +33,28 @@ pipe: name: Build and Upload - aarch64 environment: TERMUX_ARCH: aarch64 + UPLOAD_DELAY: 0 pipe: << : *BUILD_PIPE_TEMPLATE name: Build and Upload - arm environment: TERMUX_ARCH: arm + UPLOAD_DELAY: 20 pipe: << : *BUILD_PIPE_TEMPLATE name: Build and Upload - i686 environment: TERMUX_ARCH: i686 + UPLOAD_DELAY: 40 pipe: << : *BUILD_PIPE_TEMPLATE name: Build and Upload - x86_64 environment: TERMUX_ARCH: x86_64 + UPLOAD_DELAY: 60 task: diff --git a/scripts/build/ci/cirrus-ci_dispatcher.sh b/scripts/build/ci/cirrus-ci_dispatcher.sh index 021a35afc..6689ec447 100755 --- a/scripts/build/ci/cirrus-ci_dispatcher.sh +++ b/scripts/build/ci/cirrus-ci_dispatcher.sh @@ -129,11 +129,11 @@ else fi # Workaround for concurrent uploads. - UPLOAD_DELAY=$((30 + RANDOM % 120)) - echo "[!] Using workaround for Bintray issue with concurrent uploads." - echo "[!] Delaying upload by ${UPLOAD_DELAY} seconds." - sleep $UPLOAD_DELAY - unset UPLOAD_DELAY + if [ "$UPLOAD_DELAY" != "0" ]; + echo "[!] Using workaround for Bintray issue with concurrent uploads." + echo "[!] Delaying upload by ${UPLOAD_DELAY} seconds." + sleep $UPLOAD_DELAY + fi for attempt in 1 2 3; do echo "[*] Uploading packages to Bintray:"