Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Commit

Permalink
Fix issues with tests not running if build upload fails (#4453)
Browse files Browse the repository at this point in the history
* Fix issues with tests not running if build upload fails

* Fix script

* One more fix for script

* Fix white space at start of file
  • Loading branch information
nwmac committed Jul 21, 2020
1 parent 6199434 commit a82e5d9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
19 changes: 11 additions & 8 deletions deploy/ci/travis/e2e-build-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ function tryGetExistingBuild() {
fi
}

# Need S3 endpoint - if we don't have it, we don't have the Travis env vars
if [ -n "${AWS_ENDPOINT}" ]; then
tryGetExistingBuild
fi
Expand All @@ -68,14 +69,16 @@ else
npm run build
npm run build-backend

set +e
tar cvfz ${GZIP_NAME} dist/* src/jetstream/jetstream
# Only try to upload if we have the S3 configuration
if [ -n "${AWS_ENDPOINT}" ]; then
set +e
tar cvfz ${GZIP_NAME} dist/* src/jetstream/jetstream

# Upload
mc cp -q --insecure ${GZIP_NAME} ${MC_HOST}/${S3_BUILDS_BUCKET}

# Ignore error from uploading - should not fail build if we can't upload the build archive
# This just means we won't be able to us this cache next build
exit 0
# Upload
mc cp -q --insecure ${GZIP_NAME} ${MC_HOST}/${S3_BUILDS_BUCKET}

# Ignore error from uploading - should not fail build if we can't upload the build archive
# This just means we won't be able to us this cache next build
echo "Uploaded builds"
fi
fi
3 changes: 2 additions & 1 deletion deploy/ci/travis/e2e-mc-helper.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Helper for mc command

mc version > /dev/null
# Check if mc command is available (don't log error if it is not)
mc version > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "mc command already installed and confgiured"
else
Expand Down

0 comments on commit a82e5d9

Please sign in to comment.