Skip to content
Snippets Groups Projects
Verified Commit 044c6e50 authored by David Hoese's avatar David Hoese
Browse files

Fix CI tests since after_script is in a separate environment

parent 0af83982
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env bash
helm uninstall ${GRB_RELEASE_NAME}
\ No newline at end of file
debug() {
>&2 echo "DEBUG: $@"
}
error() {
>&2 echo "ERROR: $@"
exit 1
}
check_and_uninstall() {
release_name=$1
if [[ -z ${release_name} ]]; then
# the chart was never created
return
fi
debug "Uninstalling ${release_name}"
helm uninstall ${release_name} | error "Could not uninstall chart $release_name"
}
source ./ci_tests/get_release_names.sh
check_and_uninstall ${GRB_RELEASE_NAME}
\ No newline at end of file
#!/usr/bin/env bash
export RELEASE_PREFIX="${CI_JOB_NAME//_/-}-${CI_JOB_ID//_/-}"
export GRB_RELEASE_NAME="${RELEASE_PREFIX}-cspp-geo-grb"
......@@ -70,8 +70,7 @@ test_basic_grb:
extends: .helm_based_job
stage: test
script:
# need to source to get release name variables for cleanup
- source ./ci_tests/run_basic_grb_test.sh
- ./ci_tests/run_basic_grb_test.sh
after_script:
- ./ci_tests/cleanup_basic_grb_test.sh
dependencies:
......
......@@ -12,15 +12,17 @@ error() {
set -e
ns=$(./helpers/get_namespace.sh)
cd geosphere-grb/chart
export RELEASE_PREFIX="${CI_JOB_NAME//_/-}-${CI_JOB_ID//_/-}"
export GRB_RELEASE_NAME="${RELEASE_PREFIX}-cspp-geo-grb"
pushd geosphere-grb/chart
source ci_tests/get_release_names.sh
helm upgrade -v 2 --install --namespace $ns -f ../../ci_tests/values-grb-g16.yaml ${GRB_RELEASE_NAME} cspp-geo-grb/
popd
# give kubernetes a bit to create the pod
sleep 5
sleep 30
debug "Getting pod name"
GRB_POD_NAME=$(kubectl -n $ns get pods --selector=app.kubernetes.io/instance=${GRB_RELEASE_NAME} -o name)
debug "GRB pod name: ${GRB_POD_NAME}"
count=0
while true; do
num_files=$(kubectl exec -n $ns ${GRB_POD_NAME} -- ls -1 /dst/products | wc -l)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment