summaryrefslogtreecommitdiff
path: root/scripts/node/after_script.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/node/after_script.sh')
-rwxr-xr-xscripts/node/after_script.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/node/after_script.sh b/scripts/node/after_script.sh
index d78e820e92..237f9fe600 100755
--- a/scripts/node/after_script.sh
+++ b/scripts/node/after_script.sh
@@ -35,3 +35,16 @@ if test "${COMMIT_MESSAGE#*'[publish binary]'}" != "$COMMIT_MESSAGE"; then
npm test
fi
fi
+
+if [ ! -z "${AWS_ACCESS_KEY_ID}" ] && [ ! -z "${AWS_SECRET_ACCESS_KEY}" ] ; then
+ # Install and add awscli to PATH for uploading the results
+ pip install --user awscli
+ export PATH="`python -m site --user-base`/bin:${PATH}"
+
+ REPO_NAME=$(basename $TRAVIS_REPO_SLUG)
+ gzip --stdout node_modules/mapbox-gl-test-suite/tests/index.html | \
+ aws s3 cp --acl public-read --content-encoding gzip --content-type text/html \
+ - s3://mapbox/$REPO_NAME/tests/$TRAVIS_JOB_NUMBER/index.html
+
+ echo http://mapbox.s3.amazonaws.com/$REPO_NAME/tests/$TRAVIS_JOB_NUMBER/index.html
+fi