Skip to content

Commit

Permalink
Finalize demo-prj artifacts packing for aws upload
Browse files Browse the repository at this point in the history
  • Loading branch information
d4vidi committed Dec 22, 2019
1 parent fd1d5d5 commit 9967b5e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/upload_artifact.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/bin/bash

export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY
export AWS_SECRET_ACCESS_KEY=$AWS_ACCESS_SECRET
Expand All @@ -10,19 +10,19 @@ upload_artifacts() {
CONTEXT=$2

if [ $JENKINS_CI ]; then
ARTIFACTS_NAME="artifacts_${CONTEXT}_${BUILD_ID}_${DATE}.tar.gz"
ARTIFACTS_NAME="artifacts_${BUILD_ID}_${CONTEXT}_${DATE}.tar.gz"
else
ARTIFACTS_NAME="artifacts_${CONTEXT}_${TRAVIS_BUILD_ID}_${DATE}.tar.gz"
ARTIFACTS_NAME="artifacts_${TRAVIS_BUILD_ID}_${CONTEXT}_${DATE}.tar.gz"
fi

if [ -d "$ARTIFACTS_DIR" ]; then
echo "Packing artifacts..."
tar cvzf "${ARTIFACTS_NAME}" ./detox/test/artifacts/
echo "Packing artifacts... (${CONTEXT})"
tar cvzf "${ARTIFACTS_NAME}" ${ARTIFACTS_DIR}

if [ $JENKINS_CI ]; then
echo "Upload: Jenkins will upload using built-in plugin"
else
echo "Uploading artifacts..."
echo "Uploading artifacts..."
aws s3 cp "${ARTIFACTS_NAME}" s3://detox-artifacts/ --region=us-east-1
fi

Expand Down

0 comments on commit 9967b5e

Please sign in to comment.