Skip to content
Snippets Groups Projects
cleanup_basic_grb_test.sh 501 B
Newer Older
#!/usr/bin/env bash

debug() {
    >&2 echo "DEBUG: $@"
}

error() {
    >&2 echo "ERROR: $@"
    exit 1
}

check_and_uninstall() {
David Hoese's avatar
David Hoese committed
    release_name="$1"
    if [[ -z "${release_name}" ]]; then
        # the chart was never created
David Hoese's avatar
David Hoese committed
        debug "Release doesn't exist"
        return
    fi
    debug "Uninstalling ${release_name}"
    helm uninstall ${release_name} | error "Could not uninstall chart $release_name"
}

source ./ci_tests/get_release_names.sh
David Hoese's avatar
David Hoese committed
check_and_uninstall "${GRB_RELEASE_NAME}"