Fix standup and teardown scripts

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
2024-02-12 08:00:25 +00:00
parent 67a6f50ca7
commit 9c67d15489
2 changed files with 23 additions and 2 deletions

View File

@@ -3,6 +3,8 @@
source .utils
CODE_DIR="${HOME}/Code/GiantSwarm/cluster-test-suites"
CUR_DIR=$(pwd)
INPUT_DIR=${CUR_DIR}
print_usage() {
orange "gs-teardown - Teardown a previously created test cluster"
@@ -17,6 +19,7 @@ print_usage() {
underline "Options:"
echo "-h, --help show this help text"
echo " --dir override the directory of cluster-test-suite code"
echo " --in override the directory where the previously output files exist"
}
POS_ARGS=()
@@ -32,6 +35,11 @@ while test $# -gt 0; do
CODE_DIR=$1
shift
;;
--input)
shift
INPUT_DIR=$1
shift
;;
*)
POS_ARGS+=(`echo $1 | tr '/' ' '`)
shift
@@ -75,10 +83,12 @@ case ${#POS_ARGS[@]} in
;;
esac
cd ${CODE_DIR}
go run ${CODE_DIR}/cmd/teardown/main.go \
--provider ${PROVIDER} \
--context ${CONTEXT} \
--standup-directory ./
--standup-directory ${OUTPUT_DIR}
cd ${CUR_DIR}
;;
*)
print_usage