Fix standup/teardown

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
Marcus Noble 2024-05-03 15:32:59 +01:00
parent aae5d5791d
commit a1cd7f9eae
Signed by: AverageMarcus
GPG Key ID: B8F2DB8A7AEBAF78
2 changed files with 15 additions and 1 deletions

View File

@ -3,7 +3,8 @@
source .utils
CODE_DIR="${HOME}/Code/GiantSwarm/cluster-standup-teardown"
OUTPUT_DIR=$(pwd)
CUR_DIR=$(pwd)
OUTPUT_DIR=${CUR_DIR}
print_usage() {
orange "gs-standup - Standup a new test workload cluster, using the cluster-test-suites modules."
@ -52,32 +53,42 @@ case ${#POS_ARGS[@]} in
exit 1
;;
1)
PROVIDER=""
CONTEXT=""
case ${POS_ARGS[0]} in
"aws"|"capa")
PROVIDER="aws"
CONTEXT="capa"
;;
"azure"|"capz")
PROVIDER="azure"
CONTEXT="capz"
;;
"vsphere"|"capv")
PROVIDER="vsphere"
CONTEXT="capv"
;;
"cloud-director"|"capvcd")
PROVIDER="cloud-director"
CONTEXT="capvcd"
;;
"eks")
PROVIDER="eks"
CONTEXT="eks"
;;
"aws-private"|"capa-private")
PROVIDER="aws"
CONTEXT="capa-private-proxy"
;;
esac
cd ${CODE_DIR}
go run ${CODE_DIR}/cmd/standup/main.go \
--provider ${PROVIDER} \
--context ${CONTEXT} \
--output ${OUTPUT_DIR}
cd ${CUR_DIR}
;;
*)
print_usage

View File

@ -3,6 +3,7 @@
source .utils
CODE_DIR="${HOME}/Code/GiantSwarm/cluster-standup-teardown"
CURR_DIR=$(pwd)
INPUT_DIR=$(pwd)
print_usage() {
@ -75,9 +76,11 @@ case ${#POS_ARGS[@]} in
;;
esac
cd ${CODE_DIR}
go run ${CODE_DIR}/cmd/teardown/main.go \
--context ${CONTEXT} \
--standup-directory ${INPUT_DIR}
cd ${CUR_DIR}
;;
*)
print_usage