From 74eb1b26d26cb540c3dbd26e8b36ddd9d7a9b782 Mon Sep 17 00:00:00 2001 From: Paul Latzelsperger Date: Thu, 16 May 2024 16:18:05 +0200 Subject: [PATCH] feat(ci): add multi-t pushk8s versions test --- .../actions/run-deployment-test/action.yml | 21 +++++++++++++++++++ .github/workflows/deployment-test.yaml | 6 ++++++ 2 files changed, 27 insertions(+) diff --git a/.github/actions/run-deployment-test/action.yml b/.github/actions/run-deployment-test/action.yml index 0564771c3..e1ab355c8 100644 --- a/.github/actions/run-deployment-test/action.yml +++ b/.github/actions/run-deployment-test/action.yml @@ -40,6 +40,11 @@ inputs: required: true description: "The directory that contains the docker file, e.g. edc-controlplane/edc-runtime-memory" + k8sversion: + required: false + description: "Version of Kubernetes to use" + default: "1.30.0" + runs: using: "composite" steps: @@ -56,6 +61,19 @@ runs: with: version: v3.8.1 + - name: Prepare KinD Config + shell: bash + run: |- + cat << EOT > config.yaml + --- + kind: Cluster + apiVersion: kind.x-k8s.io/v1alpha4 + nodes: + - role: control-plane + - role: worker + image: kindest/node:v${{ inputs.k8sversion }} + EOT + - name: Setup Kubectl uses: azure/setup-kubectl@v3.2 with: @@ -63,6 +81,9 @@ runs: - name: Create k8s Kind Cluster uses: helm/kind-action@v1.5.0 + with: + config: ./config.yaml + - name: Load images into KinD shell: bash diff --git a/.github/workflows/deployment-test.yaml b/.github/workflows/deployment-test.yaml index 1ab1187e1..183e9deee 100644 --- a/.github/workflows/deployment-test.yaml +++ b/.github/workflows/deployment-test.yaml @@ -77,6 +77,11 @@ jobs: test-hashicorp-postgres: runs-on: ubuntu-latest needs: test-prepare + strategy: + fail-fast: false + # this will verify that the official distribution of the Tractus-X EDC Helm chart runs on the last 3 Kubernetes versions + matrix: + k8s-version: ["1.30.0", "1.29.4", "1.28.9"] steps: - name: Checkout uses: actions/checkout@v4 @@ -85,6 +90,7 @@ jobs: with: imagename: "edc-controlplane-postgresql-hashicorp-vault edc-dataplane-hashicorp-vault" rootDir: "." + k8sversion: ${{ matrix.k8s-version }} helm_command: |- helm install tx-prod charts/tractusx-connector \ -f edc-tests/deployment/src/main/resources/helm/tractusx-connector-test.yaml \