test: fix helm2 integration tests
This commit is contained in:
parent
17a969ce83
commit
45b8eb6942
|
|
@ -50,14 +50,15 @@ if helm version --client 2>/dev/null | grep '"v2\.'; then
|
|||
helm_major_version=2
|
||||
info "Using Helm version: $(helm version --short --client | grep -o v.*$)"
|
||||
${helm} init --stable-repo-url https://charts.helm.sh/stable --wait --override spec.template.spec.automountServiceAccountToken=true
|
||||
${helm} plugin ls | grep diff || ${helm} plugin install https://github.com/databus23/helm-diff --version v2.11.0+5
|
||||
# helm v3
|
||||
else
|
||||
helm_major_version=3
|
||||
info "Using Helm version: $(helm version --short | grep -o v.*$)"
|
||||
fi
|
||||
info "Using Kustomize version: $(kustomize version --short | grep -o 'v[^ ]+')"
|
||||
${helm} plugin ls | grep diff || ${helm} plugin install https://github.com/databus23/helm-diff --version v3.1.3
|
||||
${helm} plugin ls | grep secrets || ${helm} plugin install https://github.com/jkroepke/helm-secrets --version v3.5.0
|
||||
fi
|
||||
info "Using Kustomize version: $(kustomize version --short | grep -o 'v[^ ]+')"
|
||||
${kubectl} get namespace ${test_ns} &> /dev/null && warn "Namespace ${test_ns} exists, from a previous test run?"
|
||||
$kubectl create namespace ${test_ns} || fail "Could not create namespace ${test_ns}"
|
||||
trap "{ $kubectl delete namespace ${test_ns}; }" EXIT # remove namespace whenever we exit this script
|
||||
|
|
|
|||
Loading…
Reference in New Issue