build: v1.32.1-rc1-viccuad release #617
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: End-to-end tests | |
| run-name: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.display_title || '' }} | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: Kubewarden [local|next|prev|v1.17.0] | |
| required: true | |
| default: local | |
| K3S_VERSION: | |
| description: Kubernetes version | |
| type: choice | |
| options: | |
| [ | |
| "k3d", | |
| "1.27", | |
| "1.28", | |
| "1.29", | |
| "1.30", | |
| "1.31", | |
| "1.32", | |
| "1.33", | |
| "1.34", | |
| "1.35", | |
| ] | |
| default: "k3d" | |
| ARCH: | |
| description: Runner architecture | |
| type: choice | |
| options: [x86, arm64] | |
| default: x86 | |
| UPGRADE: | |
| description: Enable upgrade test | |
| type: boolean | |
| default: false | |
| MTLS: | |
| description: Enable mutual TLS | |
| type: boolean | |
| default: false | |
| LATEST: | |
| description: Use latest images | |
| type: boolean | |
| default: false | |
| CONTROLLER_ARGS: | |
| description: Helm flags for controller | |
| DEFAULTS_ARGS: | |
| description: Helm flags for defaults | |
| # PR: install + tests from PR | |
| pull_request: | |
| branches: | |
| - "main" | |
| paths: | |
| - "charts/kubewarden-*/**" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash | |
| env: | |
| K3D_VERSION: # 'v5.6.3' - optionally pin version | |
| K3D_CLUSTER_NAME: ${{ github.repository_owner }}-${{ github.event.repository.name }} | |
| MTLS: ${{ github.event_name == 'pull_request' && 'true' || inputs.MTLS }} | |
| jobs: | |
| e2e: | |
| # x86: ubuntu-latest, arm64: ubuntu-24.04-arm | |
| runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| mode: ${{ | |
| (github.event_name == 'pull_request') && fromJSON('["install"]') || | |
| fromJSON(format('["{0}"]', inputs.UPGRADE && 'upgrade' || 'install')) }} | |
| version: ${{ | |
| (github.event_name == 'pull_request') && fromJSON('["local"]') || | |
| fromJSON(format('["{0}"]', inputs.version || 'local')) }} | |
| k3s: ${{ (github.event_name == 'workflow_run') && fromJSON('["k3d", "1.27"]') || fromJSON(format('["{0}"]', inputs.K3S_VERSION || 'k3d' )) }} | |
| arch: ${{ (github.event_name == 'workflow_run') && fromJSON('["x86", "arm64"]') || fromJSON(format('["{0}"]', inputs.ARCH || 'x86')) }} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| if: ${{ matrix.version == 'local' }} | |
| - run: helm repo add kubewarden https://charts.kubewarden.io | |
| if: ${{ matrix.version != 'local' || matrix.mode == 'upgrade' }} | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| repository: ${{ github.repository_owner }}/kubewarden-end-to-end-tests | |
| path: e2e-tests | |
| submodules: "true" | |
| - name: "Install kwctl" | |
| uses: kubewarden/github-actions/kwctl-installer@main | |
| with: | |
| KWCTL_VERSION: latest | |
| - run: sudo npm install -g bats | |
| - name: "Create k3d cluster" | |
| run: | | |
| wget -q -O - https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | TAG=${{ env.K3D_VERSION }} sudo --preserve-env=TAG bash | |
| # Use k3d as placehoholder for default (empty) k3s version | |
| [[ "${{ matrix.k3s }}" != "k3d" ]] && export K3S=${{ matrix.k3s }} | |
| make --directory e2e-tests cluster DOCKERHUB_USERNAME="${{ secrets.DOCKERHUB_USERNAME }}" DOCKERHUB_PASSWORD="${{ secrets.DOCKERHUB_PASSWORD }}" | |
| env: | |
| CLUSTER_NAME: ${{ env.K3D_CLUSTER_NAME }} | |
| - name: Install previous kubewarden | |
| if: ${{ matrix.mode == 'upgrade' }} | |
| working-directory: ./e2e-tests | |
| run: VERSION=prev REPO_NAME=kubewarden CHARTS_LOCATION=kubewarden make install | |
| env: | |
| MTLS: false # TODO: Remove after prev supports mTLS (kw >= 1.24-alpha) | |
| CLUSTER_NAME: ${{ env.K3D_CLUSTER_NAME }} | |
| - name: Install kubewarden and run tests | |
| working-directory: ./e2e-tests | |
| run: | | |
| if [[ "${{ matrix.version }}" == 'local' ]]; then | |
| export CHARTS_LOCATION=../charts | |
| # Chart images are updated during release, use latest for nightly jobs | |
| [[ "${{ github.event_name }}" == 'pull_request' ]] && export LATEST=true | |
| fi | |
| # mTLS should have been enabled during installation | |
| make ${{ matrix.mode }} # MTLS="{{ matrix.mode == 'upgrade' && false || env.MTLS }}" # TODO: Uncomment after prev supports mTLS (kw >= 1.24-alpha) | |
| ./scripts/helmer.sh debug | |
| # Run tests | |
| make tests audit-scanner-installation.bats | |
| make uninstall | |
| env: | |
| CLUSTER_NAME: ${{ env.K3D_CLUSTER_NAME }} | |
| VERSION: ${{ matrix.version }} | |
| LATEST: ${{ inputs.LATEST }} | |
| DEFAULTS_ARGS: ${{ inputs.DEFAULTS_ARGS }} | |
| CONTROLLER_ARGS: ${{ inputs.CONTROLLER_ARGS }} | |
| # Override OTEL operator version by github variable | |
| OTEL_OPERATOR: ${{ vars.OTEL_OPERATOR }} | |
| - name: Clean Up | |
| if: always() | |
| run: make --directory e2e-tests clean | |
| env: | |
| CLUSTER_NAME: ${{ env.K3D_CLUSTER_NAME }} |