@@ -59,13 +59,16 @@ outputs:
5959runs :
6060 using : composite
6161 steps :
62+ - name : Install interu
63+ uses : stackabletech/actions/setup-tools
64+ with :
65+ interu-version : ${{ inputs.interu-version }}
6266 - name : Extract Test and Instance Configuration
6367 env :
6468 TEST_MODE_INPUT : ${{ inputs.test-mode-input }}
6569 TEST_SUITE : ${{ inputs.test-suite }}
6670 TEST_MODE : ${{ inputs.test-mode }}
6771 TEST : ${{ inputs.test }}
68- INTERU_VERSION : ${{ inputs.interu-version }}
6972 GITHUB_DEBUG : ${{ runner.debug }}
7073 GITHUB_REPOSITORY : ${{ github.repository }}
7174 GITHUB_RUN_ID : ${{ github.run_id }}"
7477 set -euo pipefail
7578 [ -n "$GITHUB_DEBUG" ] && set -x
7679
77- # Download interu
78- curl -fsSL -o /tmp/interu "https://github.com/stackabletech/actions/releases/download/interu-$INTERU_VERSION/interu-x86_64-unknown-linux-gnu"
79- sudo install -m 755 -t /usr/local/bin /tmp/interu
80-
8180 # Generate the cluster name
8281 echo "KUBERNETES_CLUSTER_NAME=integration-test-${GITHUB_REPOSITORY}-${GITHUB_RUN_ID}" | tee -a "$GITHUB_ENV"
8382
@@ -97,93 +96,24 @@ runs:
9796 # Install all tools BEFORE creating the cluster, because if some of the tools fail to download
9897 # and are therefore not available, there is no need to create the cluster or run the tests,
9998 # because the tests can never run in the first place.
100-
101- # We technically don't need to install kubectl, kind or helm because it is already part of the installed
102- # tools of the runner image, but we at least install kubectl and helm explicitly, to be able to pin the versions.
103- # See https://github.com/actions/runner-images/blob/main/images/ubuntu/scripts/build/install-kubernetes-tools.sh
104- - name : Install kubectl
105- env :
106- KUBECTL_VERSION : ${{ inputs.kubectl-version }}
107- GITHUB_DEBUG : ${{ runner.debug }}
108- shell : bash
109- run : |
110- set -euo pipefail
111- [ -n "$GITHUB_DEBUG" ] && set -x
112-
113- ARCH=$("$GITHUB_ACTION_PATH/../.scripts/actions/get_architecture.sh")
114-
115- echo "::group::Install kubectl"
116- curl -fsSL -o /tmp/kubectl "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/${ARCH}/kubectl"
117- # Overwrite the existing binary
118- sudo install -m 755 -t /usr/local/bin /tmp/kubectl
119-
120- kubectl version --client
121- echo "::endgroup::"
122-
123- - name : Install Helm
124- env :
125- HELM_VERSION : ${{ inputs.helm-version }}
126- GITHUB_DEBUG : ${{ runner.debug }}
127- shell : bash
128- run : |
129- set -euo pipefail
130- [ -n "$GITHUB_DEBUG" ] && set -x
131-
132- PLATFORM=$("$GITHUB_ACTION_PATH/../.scripts/actions/get_platform.sh")
133- ARCH=$("$GITHUB_ACTION_PATH/../.scripts/actions/get_architecture.sh")
134-
135- FILENAME="helm-${HELM_VERSION}-${PLATFORM}-${ARCH}.tar.gz"
136-
137- echo "::group::Install helm"
138- mkdir /tmp/helm
139- curl -fsSL -o /tmp/helm/helm.tar.gz "https://get.helm.sh/${FILENAME}"
140- curl -fsSL -o /tmp/helm/helm.tar.gz.asc "https://github.com/helm/helm/releases/download/${HELM_VERSION}/${FILENAME}.asc"
141-
142- curl https://keybase.io/mattfarina/pgp_keys.asc | gpg --import
143- gpg --verify /tmp/helm/helm.tar.gz.asc /tmp/helm/helm.tar.gz
144-
145- tar --directory="/tmp/helm" --strip-components=1 -zxvf /tmp/helm/helm.tar.gz "${PLATFORM}-${ARCH}"
146- # Overwrite the existing binary
147- sudo install -m 755 -t /usr/local/bin /tmp/helm/helm
148-
149- helm version --short
150- echo "::endgroup::"
151-
152- - name : Install kubectl-kuttl
153- env :
154- KUTTL_VERSION : ${{ inputs.kuttl-version }}
155- GITHUB_DEBUG : ${{ runner.debug }}
156- shell : bash
157- run : |
158- set -euo pipefail
159- [ -n "$GITHUB_DEBUG" ] && set -x
160-
161- curl -fsSL -o /tmp/kubectl-kuttl "https://github.com/kudobuilder/kuttl/releases/download/v$KUTTL_VERSION/kubectl-kuttl_${KUTTL_VERSION}_linux_x86_64"
162- sudo install -m 755 -t /usr/local/bin /tmp/kubectl-kuttl
99+ - name : Install kubectl, kubectl-kuttl, and helm
100+ uses : stackablectl/actions/setup-k8s-tools
101+ with :
102+ kubectl-version : ${{ inputs.kubectl-version }}
103+ kuttl-version : ${{ inputs.kuttl-version }}
104+ helm-version : ${{ inputs.helm-version }}
163105
164106 # Python3 is already installed, if we ever need to specify the version, we can use the
165107 # setup-python action.
166108 # See https://github.com/actions/runner-images/blob/main/images/ubuntu/scripts/build/install-python.sh
167- - name : Install beku
168- env :
169- BEKU_VERSION : ${{ inputs.beku-version }}
170- shell : bash
171- run : |
172- set -euo pipefail
173- pip install "beku-stackabletech==$BEKU_VERSION"
174-
109+ #
175110 # mikefarah/yq is already installed on the runner
176111 # See https://github.com/actions/runner-images/blob/main/images/ubuntu/scripts/build/install-yq.sh
177-
178- - name : Install stackablectl
179- env :
180- STACKABLECTL_VERSION : ${{ inputs.stackablectl-version }}
181- shell : bash
182- run : |
183- set -euo pipefail
184-
185- curl -fsSL -o /tmp/stackablectl "https://github.com/stackabletech/stackable-cockpit/releases/download/stackablectl-$STACKABLECTL_VERSION/stackablectl-x86_64-unknown-linux-gnu"
186- sudo install -m 755 -t /usr/local/bin /tmp/stackablectl
112+ - name : Install stackablectl and beku
113+ uses : stackabletech/actions/setup-tools
114+ with :
115+ stackablectl-version : ${{ inputs.stackablectl-version }}
116+ beku-version : ${{ inputs.beku-version }}
187117
188118 - name : Install apt packages
189119 shell : bash
0 commit comments