diff options
author | Leith Bade <leith@mapbox.com> | 2015-01-02 09:56:55 +1300 |
---|---|---|
committer | Leith Bade <leith@mapbox.com> | 2015-01-02 09:56:55 +1300 |
commit | 937d8ef8d6a5f5aca6a3a2ad0189aed18fd0bfa3 (patch) | |
tree | 1a6ba55b1f82e019c6f0e1325bf14a738b288cc5 /android/scripts | |
parent | e7db2ecd9a81000fe8cdacd0fe21f4890b9f93fa (diff) | |
download | qtlocation-mapboxgl-937d8ef8d6a5f5aca6a3a2ad0189aed18fd0bfa3.tar.gz |
Use testmunk from EC2
Diffstat (limited to 'android/scripts')
-rwxr-xr-x | android/scripts/build-release.sh | 1 | ||||
-rwxr-xr-x | android/scripts/common.sh | 6 | ||||
-rwxr-xr-x | android/scripts/upload-testmunk.sh | 27 |
3 files changed, 33 insertions, 1 deletions
diff --git a/android/scripts/build-release.sh b/android/scripts/build-release.sh index 73c7fab81a..c5fb9c19b0 100755 --- a/android/scripts/build-release.sh +++ b/android/scripts/build-release.sh @@ -4,5 +4,6 @@ set -e set -o pipefail export BUILDTYPE=Release +export TESTMUNK=yes ./android/scripts/common.sh $1 diff --git a/android/scripts/common.sh b/android/scripts/common.sh index 7874d1adc0..5a4036aced 100755 --- a/android/scripts/common.sh +++ b/android/scripts/common.sh @@ -14,7 +14,11 @@ export MASON_PLATFORM=android mkdir ./android/java/app/src/main/res/raw/ echo "${MAPBOX_ACCESS_TOKEN}" >> ./android/java/app/src/main/res/raw/token.txt -make android BUILDTYPE=$BUILDTYPE +make android BUILDTYPE=$BUILDTYPE JOBS=$JOBS aws s3 cp ./android/java/app/build/outputs/apk/app-debug.apk s3://mapbox-gl-testing/android/${NAME}/app-debug.apk aws s3 cp ./android/java/app/build/outputs/apk/app-release-unsigned.apk s3://mapbox-gl-testing/android/${NAME}/app-release-unsigned.apk + +if [[ $TESTMUNK == "yes" ]]; then + ./android/scipts/upload-testmunk.sh ./android/java/app/build/outputs/apk/app-debug.apk +fi diff --git a/android/scripts/upload-testmunk.sh b/android/scripts/upload-testmunk.sh new file mode 100755 index 0000000000..15c6530d83 --- /dev/null +++ b/android/scripts/upload-testmunk.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +set -e +set -o pipefail + +EMAIL="leith@mapbox.com" +APP_NAME="Mapbox" +APK_PATH=$1 + +echo "submitting testrun to testmunk" + +echo "uploading features..." + +zip -r features.zip features/ +RESPONSE=$(curl -f -H "Accept: application/vnd.testmunk.v1+json" -F "file=@features.zip" "https://${TESTMUNK_KEY}@api.testmunk.com/apps/${APP_NAME}/testcases") + +echo "uploading apk..." + +cd `dirname ${APK_PATH}` +RESPONSE=$(curl -f -H "Accept: application/vnd.testmunk.v1+json" -F "file=@`basename ${APK_PATH}`" -F "email=${EMAIL}" -F "autoStart=true" -F "public=true" "https://${TESTMUNK_KEY}@api.testmunk.com/apps/${APP_NAME}/testruns") + +TESTRUN_ID=$(echo "${RESPONSE}" | jq -r '.id') +TESTRUN_NAME=$(echo "${RESPONSE}" | jq -r '.name') + +echo "successully uploaded to Testmunk as '${TESTRUN_NAME}'" +echo "public link to test results: https://www.testmunk.com/testrun/${TESTRUN_ID}" +cd - |