Rafal Szmit 11e793257f
[AAE-10261] SmartRunner fix (#7760)
* [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
2022-08-17 11:39:28 +02:00

28 lines
721 B
Bash
Executable File

#!/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