Fix standup and teardown scripts
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
parent
67a6f50ca7
commit
9c67d15489
@ -3,6 +3,8 @@
|
|||||||
source .utils
|
source .utils
|
||||||
|
|
||||||
CODE_DIR="${HOME}/Code/GiantSwarm/cluster-test-suites"
|
CODE_DIR="${HOME}/Code/GiantSwarm/cluster-test-suites"
|
||||||
|
CUR_DIR=$(pwd)
|
||||||
|
OUTPUT_DIR=${CUR_DIR}
|
||||||
|
|
||||||
print_usage() {
|
print_usage() {
|
||||||
orange "gs-standup - Standup a new test workload cluster, using the cluster-test-suites modules."
|
orange "gs-standup - Standup a new test workload cluster, using the cluster-test-suites modules."
|
||||||
@ -17,6 +19,7 @@ print_usage() {
|
|||||||
underline "Options:"
|
underline "Options:"
|
||||||
echo "-h, --help show this help text"
|
echo "-h, --help show this help text"
|
||||||
echo " --dir override the directory of cluster-test-suite code"
|
echo " --dir override the directory of cluster-test-suite code"
|
||||||
|
echo "-o --output override the directory the files output to"
|
||||||
}
|
}
|
||||||
|
|
||||||
POS_ARGS=()
|
POS_ARGS=()
|
||||||
@ -32,6 +35,11 @@ while test $# -gt 0; do
|
|||||||
CODE_DIR=$1
|
CODE_DIR=$1
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
-o|--output)
|
||||||
|
shift
|
||||||
|
OUTPUT_DIR=$1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
POS_ARGS+=(`echo $1 | tr '/' ' '`)
|
POS_ARGS+=(`echo $1 | tr '/' ' '`)
|
||||||
shift
|
shift
|
||||||
@ -75,11 +83,14 @@ case ${#POS_ARGS[@]} in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
cd ${CODE_DIR}
|
||||||
go run ${CODE_DIR}/cmd/standup/main.go \
|
go run ${CODE_DIR}/cmd/standup/main.go \
|
||||||
--provider ${PROVIDER} \
|
--provider ${PROVIDER} \
|
||||||
--context ${CONTEXT} \
|
--context ${CONTEXT} \
|
||||||
--cluster-values ${CODE_DIR}/providers/${CONTEXT}/standard/test_data/cluster_values.yaml \
|
--cluster-values ${CODE_DIR}/providers/${CONTEXT}/standard/test_data/cluster_values.yaml \
|
||||||
--default-apps-values ${CODE_DIR}/providers/${CONTEXT}/standard/test_data/default-apps_values.yaml
|
--default-apps-values ${CODE_DIR}/providers/${CONTEXT}/standard/test_data/default-apps_values.yaml \
|
||||||
|
--output ${OUTPUT_DIR}
|
||||||
|
cd ${CUR_DIR}
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
print_usage
|
print_usage
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
source .utils
|
source .utils
|
||||||
|
|
||||||
CODE_DIR="${HOME}/Code/GiantSwarm/cluster-test-suites"
|
CODE_DIR="${HOME}/Code/GiantSwarm/cluster-test-suites"
|
||||||
|
CUR_DIR=$(pwd)
|
||||||
|
INPUT_DIR=${CUR_DIR}
|
||||||
|
|
||||||
print_usage() {
|
print_usage() {
|
||||||
orange "gs-teardown - Teardown a previously created test cluster"
|
orange "gs-teardown - Teardown a previously created test cluster"
|
||||||
@ -17,6 +19,7 @@ print_usage() {
|
|||||||
underline "Options:"
|
underline "Options:"
|
||||||
echo "-h, --help show this help text"
|
echo "-h, --help show this help text"
|
||||||
echo " --dir override the directory of cluster-test-suite code"
|
echo " --dir override the directory of cluster-test-suite code"
|
||||||
|
echo " --in override the directory where the previously output files exist"
|
||||||
}
|
}
|
||||||
|
|
||||||
POS_ARGS=()
|
POS_ARGS=()
|
||||||
@ -32,6 +35,11 @@ while test $# -gt 0; do
|
|||||||
CODE_DIR=$1
|
CODE_DIR=$1
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
--input)
|
||||||
|
shift
|
||||||
|
INPUT_DIR=$1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
POS_ARGS+=(`echo $1 | tr '/' ' '`)
|
POS_ARGS+=(`echo $1 | tr '/' ' '`)
|
||||||
shift
|
shift
|
||||||
@ -75,10 +83,12 @@ case ${#POS_ARGS[@]} in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
cd ${CODE_DIR}
|
||||||
go run ${CODE_DIR}/cmd/teardown/main.go \
|
go run ${CODE_DIR}/cmd/teardown/main.go \
|
||||||
--provider ${PROVIDER} \
|
--provider ${PROVIDER} \
|
||||||
--context ${CONTEXT} \
|
--context ${CONTEXT} \
|
||||||
--standup-directory ./
|
--standup-directory ${OUTPUT_DIR}
|
||||||
|
cd ${CUR_DIR}
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
print_usage
|
print_usage
|
||||||
|
Loading…
Reference in New Issue
Block a user