From b1f23e5f4c09700db53b89cbc9057426ea89c0aa Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Mon, 22 Jul 2019 21:33:21 +0300 Subject: [PATCH] CI: do not start upload if API key or passphrase is not set CI periodically shows error like Failed to decrypt some environment variables so it will be better to stop immediately when environment is inconsistent for unknown reason (e.g. due to Github's problems). --- scripts/build/ci/cirrus-ci_dispatcher.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/build/ci/cirrus-ci_dispatcher.sh b/scripts/build/ci/cirrus-ci_dispatcher.sh index 4b5a314c5..021a35afc 100755 --- a/scripts/build/ci/cirrus-ci_dispatcher.sh +++ b/scripts/build/ci/cirrus-ci_dispatcher.sh @@ -118,6 +118,16 @@ if ! $DO_UPLOAD; then ./build-package.sh -a "$TERMUX_ARCH" -I $PACKAGE_NAMES else + if [ -z "$BINTRAY_API_KEY" ]; then + echo "[!] Can't upload without Bintray API key." + exit 1 + fi + + if [ -z "$BINTRAY_GPG_PASSPHRASE" ]; then + echo "[!] Can't upload without GPG passphrase." + exit 1 + fi + # Workaround for concurrent uploads. UPLOAD_DELAY=$((30 + RANDOM % 120)) echo "[!] Using workaround for Bintray issue with concurrent uploads."