Merge pull request #16002 from obnoxxx/ci-stop-using-helm-sh-up

ci: don't use helm.sh up and remove helm.sh
This commit is contained in:
Travis Nielsen authored and GitHub committed 2025-06-12 14:22:15 -06:00
commit e53aaf79eb
9 files changed
+30 -66

No files matched your search

@@ -35,6 +35,11 @@ jobs:
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4.3.0
with:
version: v3.18.2
- name: consider debugging
uses: ./.github/workflows/tmate_debug
with:
@@ -53,7 +58,6 @@ jobs:
run: |
tests/scripts/github-action-helper.sh collect_udev_logs_in_background
tests/scripts/github-action-helper.sh create_helm_tag
tests/scripts/helm.sh up
export DEVICE_FILTER=$(tests/scripts/github-action-helper.sh find_extra_block_dev)
SKIP_TEST_CLEANUP=false SKIP_CLEANUP_POLICY=false go test -v -timeout 1800s -failfast -run CephHelmSuite github.com/rook/rook/tests/integration
@@ -35,6 +35,11 @@ jobs:
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4.3.0
with:
version: v3.18.2
- name: consider debugging
uses: ./.github/workflows/tmate_debug
with:
@@ -50,7 +55,6 @@ jobs:
- name: TestCephKeystoneAuthSuite
run: |
tests/scripts/github-action-helper.sh collect_udev_logs_in_background
tests/scripts/helm.sh up
export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1)
SKIP_CLEANUP_POLICY=false go test -v -timeout 3600s -failfast -run CephKeystoneAuthSuite github.com/rook/rook/tests/integration
@@ -80,6 +80,11 @@ jobs:
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4.3.0
with:
version: v3.18.2
- name: consider debugging
uses: ./.github/workflows/tmate_debug
with:
@@ -94,7 +99,6 @@ jobs:
- name: TestHelmUpgradeSuite
run: |
tests/scripts/github-action-helper.sh create_helm_tag
tests/scripts/helm.sh up
tests/scripts/github-action-helper.sh collect_udev_logs_in_background
export DEVICE_FILTER=$(tests/scripts/github-action-helper.sh find_extra_block_dev)
@@ -37,7 +37,6 @@ jobs:
run: |
tests/scripts/github-action-helper.sh collect_udev_logs_in_background
tests/scripts/github-action-helper.sh create_helm_tag
tests/scripts/helm.sh up
export DEVICE_FILTER=$(tests/scripts/github-action-helper.sh find_extra_block_dev)
SKIP_TEST_CLEANUP=false SKIP_CLEANUP_POLICY=false go test -v -timeout 1800s -run CephHelmSuite github.com/rook/rook/tests/integration
@@ -193,8 +192,6 @@ jobs:
- name: TestHelmUpgradeSuite
run: |
tests/scripts/github-action-helper.sh create_helm_tag
tests/scripts/helm.sh up
tests/scripts/github-action-helper.sh collect_udev_logs_in_background
export DEVICE_FILTER=$(tests/scripts/github-action-helper.sh find_extra_block_dev)
go test -v -timeout 1800s -run CephUpgradeSuite/TestUpgradeHelm github.com/rook/rook/tests/integration
@@ -61,6 +61,9 @@ export TEST_BASE_DIR=WORKING_DIR
export TEST_SCRATCH_DEVICE=/dev/vdb
```
The `helm` tool is expected to be installed on the system. If it is not available in the `$PATH`, set the variable `TEST_HELM_PATH`.
otherwise, it should be set to the non-standard location of the `helm` binary.
Set `TEST_SCRATCH_DEVICE` to the correct block device name based on the driver that's being used.
!!! hint
+1 -1
View File
@@ -981,7 +981,7 @@ func NewCephInstaller(t func() *testing.T, clientset *kubernetes.Clientset, sett
settings: settings,
Manifests: NewCephManifests(settings),
k8shelper: k8shelp,
helmHelper: utils.NewHelmHelper(testHelmPath()),
helmHelper: utils.NewHelmHelper(TestHelmPath()),
k8sVersion: version.String(),
changeHostnames: settings.ChangeHostName,
T: t,
+10 -3
View File
@@ -18,11 +18,18 @@ package installer
import (
"os"
"os/exec"
)
// testHelmPath gets the helm path
func testHelmPath() string {
return getEnvVarWithDefault("TEST_HELM_PATH", "/tmp/rook-tests-scripts-helm/helm")
// TestHelmPath gets the path of the helm binary
func TestHelmPath() string {
helmPath := os.Getenv("TEST_HELM_PATH")
if helmPath == "" {
if path, err := exec.LookPath("helm"); err == nil {
helmPath = path
}
}
return helmPath
}
// TestLogCollectionLevel gets whether to collect all logs
+1 -7
View File
@@ -18,7 +18,6 @@ package integration
import (
"context"
"os"
"testing"
"github.com/rook/rook/tests/framework/clients"
@@ -85,12 +84,7 @@ func InstallKeystoneInTestCluster(shelper *utils.K8sHelper, namespace string) er
// the helm installer uses the rook repository and cannot be used as is
// therefore parts of the installer are adapted here
// use helm path from environment (the same is used by the helm installer)
helmPath := os.Getenv("TEST_HELM_PATH")
if helmPath == "" {
helmPath = "/tmp/rook-tests-scripts-helm/helm"
}
helmHelper := utils.NewHelmHelper(helmPath)
helmHelper := utils.NewHelmHelper(installer.TestHelmPath())
// add the cert-manager helm repo
logger.Infof("adding cert-manager helm repo")
-49
View File
@@ -1,49 +0,0 @@
#!/usr/bin/env -S bash +e
temp="/tmp/rook-tests-scripts-helm"
helm_version="${HELM_VERSION:-"v3.18.2"}"
arch="${ARCH:-}"
detectArch() {
case "$(uname -m)" in
"x86_64" | "amd64")
arch="amd64"
;;
"aarch64")
arch="arm64"
;;
"i386")
arch="i386"
;;
*)
echo "Couldn't translate 'uname -m' output to an available arch."
echo "Try setting ARCH environment variable to your system arch:"
echo "amd64, x86_64. aarch64, i386"
exit 1
;;
esac
}
install() {
# Download and unpack helm
local dist
dist="$(uname -s)"
dist=$(echo "${dist}" | tr "[:upper:]" "[:lower:]")
mkdir -p "${temp}"
wget "https://get.helm.sh/helm-${helm_version}-${dist}-${arch}.tar.gz" -O "${temp}/helm.tar.gz"
tar -C "${temp}" -xvf "${temp}/helm.tar.gz" --strip-components 1
}
if [ -z "${arch}" ]; then
detectArch
fi
case "${1:-}" in
up)
install
;;
*)
echo "usage:" >&2
echo " $0 up" >&2
esac