Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [AAE-1026] s3 store + fake test * [ci:force] test run 1 * [ci:force] test run 2 * [ci:force] test run 3 - one job * [ci:force] path fix * [ci:force] install awscli * add after script for all jobs * [ci:force] trigger travis * remove fake test * trigger travis
- Loading branch information
1 parent
d2a246a
commit 11e7932
Showing
6 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Upload protractor-smartrunner artifact related to this particular job to S3 | ||
./scripts/ci/utils/artifact-to-s3.sh -a "$SMART_RUNNER_DIRECTORY" -o "$S3_SMART_RUNNER_PATH/$TRAVIS_JOB_ID.tar.bz2" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env bash | ||
|
||
show_help() { | ||
echo "Usage: dbpci-artifact-from-s3 <options>" | ||
echo "" | ||
echo "-a or --artifact [mandatory]: path to the s3 artifact (tar.bz2) to download and extract" | ||
echo "-o or --output [mandatory]: directory to extract the archive to" | ||
} | ||
|
||
while [[ $1 == -* ]]; do | ||
case "$1" in | ||
-h|--help|-\?) show_help; exit 0;; | ||
-a|--artifact) ARTIFACT=$2; shift 2;; | ||
-o|--output) OUTPUT=$2; shift 2;; | ||
-*) shift;; | ||
esac | ||
done | ||
|
||
if [ "${ARTIFACT}" == "" ] || [ "${OUTPUT}" == "" ] | ||
then | ||
show_help; | ||
exit 1 | ||
fi | ||
|
||
echo -e "Download from S3 $ARTIFACT to $OUTPUT" | ||
test ! -d $OUTPUT && mkdir -p $OUTPUT | ||
|
||
IS_PRESENT="$(aws s3 ls $ARTIFACT | wc -l | tr -d ' ')" | ||
if [ "${IS_PRESENT}" == "1" ] | ||
then | ||
echo "File ${ARTIFACT} is present. Copying" | ||
aws s3 cp $ARTIFACT ./s3-artifact.tmp | ||
tar -xf ./s3-artifact.tmp -C $OUTPUT | ||
rm ./s3-artifact.tmp | ||
else | ||
echo "File ${ARTIFACT} not present" | ||
exit 1; | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
show_help() { | ||
echo "Usage: dbpci-artifact-to-s3 <options>" | ||
echo "" | ||
echo "-a or --artifact [mandatory]: path to the artifact to archieve (tar.bz2) and upload (like ./dist)" | ||
echo "-o or --output [mandatory]: the S3 object to copy it to, like: s3://bucket-name/folder/whatever.tar.bz2" | ||
} | ||
|
||
while [[ $1 == -* ]]; do | ||
case "$1" in | ||
-h|--help|-\?) show_help; exit 0;; | ||
-a|--artifact) ARTIFACT=$2; shift 2;; | ||
-o|--output) OUTPUT=$2; shift 2;; | ||
-*) shift;; | ||
esac | ||
done | ||
|
||
if [ "${ARTIFACT}" == "" ] || [ "${OUTPUT}" == "" ] | ||
then | ||
show_help; | ||
exit 1 | ||
fi | ||
|
||
tar cfj ./s3-artifact.tmp -C $ARTIFACT `ls -A $ARTIFACT` | ||
aws s3 cp ./s3-artifact.tmp $OUTPUT | ||
rm ./s3-artifact.tmp |