Popovics András f84ea5da72
[AAE-4608] Use smartrunner version 2 and add SuperCache (workspaces + S3 combo)! (#6704)
* [AAE-4608] Use smartrunner version 2

* Fix npm installing and do not depend on develop cache

* Add Travis workspaces the simplest way

* Add missing dependencies

* Remove unnecessary npm install on lint

* Fix travis indentation

* Fix e2e missing adf packages

* Trying to fix Travis

* Remove debug information

* Use Travis workspaces for smartrunner and built artefacts caching instead of S3

* Implement nuclear caching for node_modules

* Quiet snyk running, since the log length kills Travis

* Maybe with -q

* Quieting snyk

* Why displaying the added packages??????

* Fix S3 persister/retriever scripts

* Restore back parallel build and lint, to gain 10 minutes
2021-02-22 08:57:08 +00:00

28 lines
718 B
Bash
Executable File

#!/usr/bin/env bash
show_help() {
echo "Usage: artifact-to-s3.sh <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