diff --git a/prepare b/prepare new file mode 100755 index 0000000000000000000000000000000000000000..9fd00399561906d758d9ab66ae4978b99721c3dd --- /dev/null +++ b/prepare @@ -0,0 +1,21 @@ +#!/bin/bash + +usage () { + cat << EOF + Usage: $(basename $0) branch_name version + This script is ment to be invoked in a CI environment only. + +EOF + exit 2 +} + +# TODO: check for `CI_COMMIT_SHORT_SHA` and `EXIST_UPLOAD_PW`; if not set, show warning that not in CI + +[[ $# -ne 2 ]] && { usage; } + +export BRANCH=$1 +export SR_PV=$2 + +echo "Building $BRANCH environment $SR_PV..." +./build +exit $? diff --git a/publish b/publish new file mode 100755 index 0000000000000000000000000000000000000000..4ed25ede97f35d0f50a65e813409dbebf1bb9b09 --- /dev/null +++ b/publish @@ -0,0 +1,20 @@ +#!/bin/bash + +usage () { + cat << EOF + Usage: $(basename $0) file + This script is ment to be invoked in a CI environment only. + +EOF + exit 2 +} + +# TODO: check for `CI_COMMIT_SHORT_SHA` and/or `EXIST_UPLOAD_PW`; if not set, show warning that not in CI + +[[ $# -ne 1 ]] && { usage; } + +export FILE=$1 + +echo "Uploading $FILE ..." +curl -u ci:${EXIST_UPLOAD_PW} -X POST -F file=@${FILE} https://ci.de.dariah.eu/exist-upload +exit $? \ No newline at end of file