Add checks for environment values for AWS and Sonatype credentials
Change-Id: I2bae928e65acd7a2c04415c9d078c36cd7ce97e9
diff --git a/tools/build/onos-release-prerequisites b/tools/build/onos-release-prerequisites
index 5880669..fef52a4 100755
--- a/tools/build/onos-release-prerequisites
+++ b/tools/build/onos-release-prerequisites
@@ -100,6 +100,9 @@
aux=$(mktemp)
trap "cat $aux; rm -f $aux; echo 'FAILED'" ERR
printf "Checking EC2 access... "
+ : "${AWS_ACCESS_KEY_ID:?AWS_ACCESS_KEY_ID must be set}"
+ : "${AWS_SECRET_ACCESS_KEY:?AWS_SECRET_ACCESS_KEY must be set}"
+
uploadToS3.py -v 1>$aux 2>&1
rm -f $aux
echo "OK"
@@ -122,7 +125,8 @@
}
function testSonatypeAccessRest {
- #FIXME check SONATYPE_USER SONATYPE_PASSWORD
+ : "${SONATYPE_USER:?SONATYPE_USER must be set}"
+ : "${SONATYPE_PASSWORD:?SONATYPE_PASSWORD must be set}"
export ONOS_VERSION=1.2.3
printf "Checking Sonatype access via REST... "
pushd $ONOS_ROOT/tools/build/release-test >/dev/null