Skip upload from forks (#20462)

This will skip the uploading of screenshots if the S3 key is not present. This will happen when there is a PR for a fork submitted.

* Skip upload from forks

* trying with failing test

* Fixing tests

* need a rebuild
This commit is contained in:
Brent Sessions 2018-06-11 10:59:59 -06:00 committed by Rodrigo Primo
parent 4ba04cfc4e
commit 8fc43f0cad
1 changed files with 6 additions and 2 deletions

View File

@ -27,8 +27,12 @@ if [ $1 == 'after' ]; then
fi
if [[ ${RUN_E2E} == 1 && $(ls -A $TRAVIS_BUILD_DIR/screenshots) ]]; then
curl -sL https://raw.githubusercontent.com/travis-ci/artifacts/master/install | bash
artifacts upload
if [[ -z "${ARTIFACTS_KEY}" ]]; then
echo "Screenshots were not uploaded. Please run the e2e tests locally to see failures."
else
curl -sL https://raw.githubusercontent.com/travis-ci/artifacts/master/install | bash
artifacts upload
fi
fi
fi