Skip to content

Commit 2d9ab41

Browse files
committed
Fixed unittest helm plugin
1 parent 2bf57af commit 2d9ab41

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,11 @@ test: generate fmt vet manifests golang-tests
300300
# helm-tests will run helm chart unit tests
301301
helm-tests:
302302
@echo "Running helm chart unit tests..."
303-
@if ! helm plugin list | grep -q unittest; then \
304-
echo "Installing helm-unittest plugin..."; \
303+
helm version
304+
helm plugin list || true
305+
@if ! helm unittest --help >/dev/null 2>&1; then \
306+
echo "helm-unittest plugin not working/not installed, reinstalling..."; \
307+
helm plugin uninstall unittest 2>/dev/null || true; \
305308
helm plugin install https://github.com/helm-unittest/helm-unittest; \
306309
fi
307310
helm unittest helm_chart --color

scripts/dev/contexts/root-context

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,6 @@ export RELEASE_INITIAL_VERSION="1.3.0"
153153

154154
export CLUSTER_TYPE=kind
155155
export OPERATOR_CLUSTER_SCOPED=false
156+
157+
# for downloading helm binaries
158+
export HELM_VERSION="v3.19.4"

scripts/dev/setup_evg_host.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ download_kubectl() {
5656

5757
download_helm() {
5858
echo "Downloading helm..."
59-
curl -s -o helm.tar.gz -L https://get.helm.sh/helm-v3.17.1-linux-"${ARCH}"tar.gz
59+
curl -s -o helm.tar.gz -L "https://get.helm.sh/helm-${HELM_VERSION}-linux-${ARCH}tar.gz"
6060
tar -xf helm.tar.gz 2>/dev/null
6161
sudo mv linux-"${ARCH}"helm /usr/local/bin/helm
6262
rm helm.tar.gz

scripts/evergreen/setup_kubectl.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@ echo "kubectl version --client"
2222
./kubectl version --client
2323
mv kubectl "${bindir}"
2424

25-
echo "Downloading helm for ${ARCH}"
25+
echo "Downloading helm ${HELM_VERSION} for ${ARCH}"
2626
helm_archive="${tmpdir}/helm.tgz"
27-
helm_version="v3.17.1"
28-
curl --retry 5 --retry-delay 3 --retry-all-errors --fail --show-error --max-time 180 -s https://get.helm.sh/helm-${helm_version}-linux-"${ARCH}".tar.gz --output "${helm_archive}"
27+
curl --retry 5 --retry-delay 3 --retry-all-errors --fail --show-error --max-time 180 -s "https://get.helm.sh/helm-${HELM_VERSION}-linux-${ARCH}.tar.gz" --output "${helm_archive}"
2928

3029
tar xfz "${helm_archive}" -C "${tmpdir}" &> /dev/null
3130
mv "${tmpdir}/linux-${ARCH}/helm" "${bindir}"

0 commit comments

Comments
 (0)