|
13 | 13 | # limitations under the License. |
14 | 14 |
|
15 | 15 | name: 'Install E2E Testing Tools' |
16 | | -description: 'Installs ctlptl, kind, kubectl, and tilt for E2E testing' |
| 16 | +description: 'Installs ctlptl, kind, kubectl, helm, and tilt for E2E testing' |
17 | 17 |
|
18 | 18 | runs: |
19 | 19 | using: "composite" |
|
25 | 25 | KIND_VERSION=$(yq eval '.testing_tools.kind' .versions.yaml) |
26 | 26 | CTLPTL_VERSION=$(yq eval '.testing_tools.ctlptl' .versions.yaml) |
27 | 27 | TILT_VERSION=$(yq eval '.testing_tools.tilt' .versions.yaml) |
| 28 | + HELM_VERSION=$(yq eval '.testing_tools.helm' .versions.yaml) |
28 | 29 | echo "kind_version=${KIND_VERSION}" >> $GITHUB_OUTPUT |
29 | 30 | echo "ctlptl_version=${CTLPTL_VERSION}" >> $GITHUB_OUTPUT |
30 | 31 | echo "tilt_version=${TILT_VERSION}" >> $GITHUB_OUTPUT |
| 32 | + echo "helm_version=${HELM_VERSION}" >> $GITHUB_OUTPUT |
31 | 33 |
|
32 | 34 | - name: Cache E2E testing tools |
33 | 35 | uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 |
|
37 | 39 | /usr/local/bin/kind |
38 | 40 | /usr/local/bin/kubectl |
39 | 41 | /usr/local/bin/tilt |
40 | | - key: ${{ runner.os }}-${{ runner.arch }}-e2e-tools-${{ steps.versions.outputs.kind_version }}-${{ steps.versions.outputs.ctlptl_version }}-${{ steps.versions.outputs.tilt_version }} |
| 42 | + /usr/local/bin/helm |
| 43 | + key: ${{ runner.os }}-${{ runner.arch }}-e2e-tools-${{ steps.versions.outputs.kind_version }}-${{ steps.versions.outputs.ctlptl_version }}-${{ steps.versions.outputs.tilt_version }}-${{ steps.versions.outputs.helm_version }} |
41 | 44 | restore-keys: | |
42 | 45 | ${{ runner.os }}-${{ runner.arch }}-e2e-tools- |
43 | 46 |
|
|
47 | 50 | echo "Runner OS: ${{ runner.os }}" |
48 | 51 | echo "Runner architecture: ${{ runner.arch }}" |
49 | 52 | echo "System architecture (uname -m): $(uname -m)" |
50 | | - echo "Cache key will be: ${{ runner.os }}-${{ runner.arch }}-e2e-tools-${{ steps.versions.outputs.kind_version }}-${{ steps.versions.outputs.ctlptl_version }}-${{ steps.versions.outputs.tilt_version }}" |
| 53 | + echo "Cache key will be: ${{ runner.os }}-${{ runner.arch }}-e2e-tools-${{ steps.versions.outputs.kind_version }}-${{ steps.versions.outputs.ctlptl_version }}-${{ steps.versions.outputs.tilt_version }}-${{ steps.versions.outputs.helm_version }}" |
51 | 54 |
|
52 | 55 | - name: Install E2E testing tools |
53 | 56 | shell: bash |
@@ -98,11 +101,25 @@ runs: |
98 | 101 | rm -rf "$TEMP_DIR" |
99 | 102 | fi |
100 | 103 |
|
| 104 | + # Install Helm (if not cached) |
| 105 | + HELM_VERSION="${{ steps.versions.outputs.helm_version }}" |
| 106 | + if command -v helm &> /dev/null && helm version --short | grep -q "${HELM_VERSION}"; then |
| 107 | + echo "Helm ${HELM_VERSION} already installed from cache" |
| 108 | + else |
| 109 | + echo "Installing Helm ${HELM_VERSION}..." |
| 110 | + ARCH=$(case $(uname -m) in x86_64) echo amd64;; aarch64|arm64) echo arm64;; *) echo $(uname -m);; esac) |
| 111 | + TEMP_DIR=$(mktemp -d) |
| 112 | + curl -fsSL --retry 3 --keepalive-time 2 https://get.helm.sh/helm-${HELM_VERSION}-linux-${ARCH}.tar.gz | tar -xzv -C "$TEMP_DIR" |
| 113 | + sudo mv "$TEMP_DIR/linux-${ARCH}/helm" /usr/local/bin/ |
| 114 | + rm -rf "$TEMP_DIR" |
| 115 | + fi |
| 116 | +
|
101 | 117 | # Verify installations |
102 | 118 | echo "Verifying tool installations:" |
103 | 119 | echo "ctlptl: $(ctlptl version)" |
104 | 120 | echo "Kind: $(kind version)" |
105 | 121 | echo "kubectl: $(kubectl version --client)" |
106 | 122 | echo "Tilt: $(tilt version)" |
| 123 | + echo "Helm: $(helm version --short)" |
107 | 124 | echo "Docker: $(docker version --format '{{.Client.Version}}')" |
108 | 125 |
|
0 commit comments