Skip to content

Commit

Permalink
Add helm wrapper to convert --reuse-values to --reset-then-reuse-valu…
Browse files Browse the repository at this point in the history
…es for CT testing

Signed-off-by: Connor Catlett <[email protected]>
  • Loading branch information
ConnorJC3 committed Mar 7, 2024
1 parent f335f99 commit 33746fe
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
21 changes: 21 additions & 0 deletions hack/tools/helm-runner.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

# Copyright 2024 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This script is used as a stub for helm to substitute --reset-then-reuse-values
# for instances of --reuse-values until https://github.com/helm/chart-testing/pull/531
# or a similar PR is merged and released

exec "$(dirname "${0}")/.helm" "${@//--reuse-values/--reset-then-reuse-values}"
6 changes: 3 additions & 3 deletions hack/tools/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ function install_tar_binary() {
INSTALL_PATH="${1}"
DOWNLOAD_URL="${2}"
BINARY_PATH="${3}"

BINARY_NAME="$(basename "${BINARY_PATH}")"
BINARY_NAME="${4:-$(basename "${BINARY_PATH}")}"

if [ "${DOWNLOAD_URL##*.}" = "gz" ]; then
TAR_EXTRA_FLAGS="-z"
Expand Down Expand Up @@ -128,7 +127,8 @@ function install_golangci-lint() {
function install_helm() {
INSTALL_PATH="${1}"

install_tar_binary "${INSTALL_PATH}" "https://get.helm.sh/helm-${HELM_VERSION}-${OS}-${ARCH}.tar.gz" "${OS}-${ARCH}/helm"
install_tar_binary "${INSTALL_PATH}" "https://get.helm.sh/helm-${HELM_VERSION}-${OS}-${ARCH}.tar.gz" "${OS}-${ARCH}/helm" ".helm"
cp "$(dirname "${0}")/helm-runner.sh" "${INSTALL_PATH}/helm"
}

function install_kops() {
Expand Down

0 comments on commit 33746fe

Please sign in to comment.