Merge pull request #5991 from guni1192/ci-fix-helm-path

ci: fix helm path
This commit is contained in:
Sébastien Han authored and GitHub committed 2020-10-15 09:45:52 +02:00
commit 0dca391659
3 files changed
+14 -14

No files matched your search

Vendored
+1 -3
View File
@@ -232,9 +232,7 @@ def RunIntegrationTest(k, v) {
echo "Running full regression"
sh '''#!/bin/bash
set -o pipefail
export PATH="/tmp/rook-tests-scripts-helm/linux-amd64:$PATH" \
KUBECONFIG=$HOME/admin.conf \
TEST_HELM_PATH=/tmp/rook-tests-scripts-helm/linux-amd64/helm \
export KUBECONFIG=$HOME/admin.conf \
TEST_ENV_NAME='''+"${k}"+''' \
TEST_BASE_DIR="WORKING_DIR" \
TEST_LOG_COLLECTION_LEVEL='''+"${env.getLogs}"+''' \
+1 -1
View File
@@ -22,7 +22,7 @@ import (
// testHelmPath gets the helm path
func testHelmPath() string {
return getEnvVarWithDefault("TEST_HELM_PATH", "helm")
return getEnvVarWithDefault("TEST_HELM_PATH", "/tmp/rook-tests-scripts-helm/helm")
}
// TestLogCollectionLevel gets whether to collect all logs
+12 -10
View File
@@ -3,7 +3,7 @@
scriptdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
temp="/tmp/rook-tests-scripts-helm"
HELM="helm"
HELM="${temp}/helm"
arch="${ARCH:-}"
detectArch() {
@@ -27,15 +27,20 @@ detectArch() {
}
install() {
if ! helm_loc="$(type -p "helm")" || [[ -z ${helm_loc} ]]; then
# Download and unpack helm
# Download and unpack helm
if [ -x "${TEST_HELM_PATH}" ]; then
HELM="${TEST_HELM_PATH}"
else
local dist
dist="$(uname -s)"
dist=$(echo "${dist}" | tr "[:upper:]" "[:lower:]")
mkdir -p "${temp}"
wget "https://storage.googleapis.com/kubernetes-helm/helm-v2.13.1-${dist}-${arch}.tar.gz" -O "${temp}/helm.tar.gz"
tar -C "${temp}" -zxvf "${temp}/helm.tar.gz"
HELM="${temp}/${dist}-${arch}/helm"
tar -C "${temp}" -zxvf "${temp}/helm.tar.gz" --strip-components 1
# The following lines are workaround of a CI failure caused by the old-Jenkins-file-is-used-in-CI problem.
# These lines will be removed as soom as PR5991 is merged..
mkdir "${temp}/${dist}-${arch}"
ln -s "${HELM}" "${temp}/${dist}-${arch}/helm"
fi
# set up RBAC for helm
@@ -82,11 +87,8 @@ install() {
}
helm_reset() {
if ! helm_loc="$(type -p "helm")" || [[ -z ${helm_loc} ]]; then
local dist
dist="$(uname -s)"
dist=$(echo "${dist}" | tr "[:upper:]" "[:lower:]")
HELM="${temp}/${dist}-${arch}/helm"
if [ -x "${TEST_HELM_PATH}" ]; then
HELM="${TEST_HELM_PATH}"
fi
"${HELM}" reset
# shellcheck disable=SC2021