Skip to content

k8s version bump and CVE fix #2446

k8s version bump and CVE fix

k8s version bump and CVE fix #2446

Workflow file for this run

name: run all tests
on:
push:
branches:
- develop
pull_request:
types: [opened, reopened, synchronize]
jobs:
test-all:
runs-on: ubuntu-latest
strategy:
matrix:
k8s-version: [v1.27.0, v1.31.0, latest]
steps:
- name: install kind
uses: helm/kind-action@v1
with:
install_only: true
- name: Resolve Kubernetes version
id: resolve-k8s-version
run: |
k8s_version=${{ matrix.k8s-version }}
if [ "${k8s_version}" = "latest" ]; then
k8s_version=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/kubernetes/kubernetes/releases/latest | grep -oE 'tag/v[0-9]+\.[0-9]+\.[0-9]+' | cut -d'/' -f2)
echo "Resolved latest k8s version to: $k8s_version"
fi
echo "::set-output name=k8s_version::$k8s_version"
- name: Create Kind Cluster(k8s version ${{ steps.resolve-k8s-version.outputs.k8s_version }})
run: |
k8s_version=${{ steps.resolve-k8s-version.outputs.k8s_version }}
kind create cluster --image kindest/node:${k8s_version}
- name: Verify kind and k8s version
run: |
kind version
kubectl version
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
path: src/github.com/${{ github.repository }}
fetch-depth: 0
- name: Set up go
uses: actions/setup-go@v5
with:
go-version-file: src/github.com/${{ github.repository }}/go.mod
- name: Verify go version
run: |
go version
- name: Run tests
run: |
set -e -x
export GOPATH=$(pwd)
pushd src/github.com/${{ github.repository }}
# Install ytt for build
mkdir -p /tmp/bin
export PATH=/tmp/bin:$PATH
./hack/verify-no-dirty-files.sh
wget -O- https://carvel.dev/install.sh | K14SIO_INSTALL_BIN_DIR=/tmp/bin bash
# Ensure that there is no existing kapp installed
rm -f /tmp/bin/kapp
./hack/build-binaries.sh
export KAPP_E2E_NAMESPACE=kapp-test
kubectl create ns $KAPP_E2E_NAMESPACE
./hack/test-all.sh