1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00

chore: better matrix jobs (#6895)

* chore: better matrix jobs

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* name

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* config

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* config

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

---------

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
Charles-Edouard Brétéché 2023-04-13 11:08:54 +02:00 committed by GitHub
parent a054f7c957
commit a0e7113047
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,16 +31,23 @@ jobs:
if-no-files-found: error if-no-files-found: error
# runs conformance test suites with configuration: # runs conformance test suites with configuration:
# - standard standard:
run-conformance:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
config:
- name: standard
values:
- standard
k8s-version: k8s-version:
- v1.24.7 - name: v1.24
- v1.25.3 version: v1.24.7
- v1.26.0 - name: v1.25
- v1.27.0 version: v1.25.3
- name: v1.26
version: v1.26.0
- name: v1.27
version: v1.27.0
tests: tests:
- autogen - autogen
- cleanup - cleanup
@ -58,6 +65,7 @@ jobs:
- webhooks - webhooks
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: prepare-images needs: prepare-images
name: ${{ matrix.k8s-version.name }} - ${{ matrix.config.name }} - ${{ matrix.tests }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
@ -67,7 +75,7 @@ jobs:
build-cache-key: run-conformance build-cache-key: run-conformance
- name: Create kind cluster - name: Create kind cluster
run: | run: |
export KIND_IMAGE=kindest/node:${{ matrix.k8s-version }} export KIND_IMAGE=kindest/node:${{ matrix.k8s-version.version }}
make kind-create-cluster make kind-create-cluster
- name: Download kyverno images archive - name: Download kyverno images archive
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
@ -76,7 +84,9 @@ jobs:
- name: Load kyverno images archive in kind cluster - name: Load kyverno images archive in kind cluster
run: make kind-load-image-archive run: make kind-load-image-archive
- name: Install kyverno - name: Install kyverno
run: make kind-install-kyverno run: |
export USE_CONFIG=${{ join(matrix.config.values, ',') }}
make kind-install-kyverno
- name: Wait for kyverno ready - name: Wait for kyverno ready
uses: ./.github/actions/kyverno-wait-ready uses: ./.github/actions/kyverno-wait-ready
- name: Test with kuttl - name: Test with kuttl
@ -88,22 +98,30 @@ jobs:
uses: ./.github/actions/kyverno-logs uses: ./.github/actions/kyverno-logs
# runs conformance test suites with configuration: # runs conformance test suites with configuration:
# - standard
# - force-failure-policy-ignore
force-failure-policy-ignore: force-failure-policy-ignore:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
config:
- name: force-failure-policy-ignore
values:
- standard
- force-failure-policy-ignore
k8s-version: k8s-version:
- v1.24.7 - name: v1.24
- v1.25.3 version: v1.24.7
- v1.26.0 - name: v1.25
- v1.27.0 version: v1.25.3
- name: v1.26
version: v1.26.0
- name: v1.27
version: v1.27.0
tests: tests:
- force-failure-policy-ignore - force-failure-policy-ignore
- rbac - rbac
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: prepare-images needs: prepare-images
name: ${{ matrix.k8s-version.name }} - ${{ matrix.config.name }} - ${{ matrix.tests }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
@ -113,7 +131,7 @@ jobs:
build-cache-key: run-conformance build-cache-key: run-conformance
- name: Create kind cluster - name: Create kind cluster
run: | run: |
export KIND_IMAGE=kindest/node:${{ matrix.k8s-version }} export KIND_IMAGE=kindest/node:${{ matrix.k8s-version.version }}
make kind-create-cluster make kind-create-cluster
- name: Download kyverno images archive - name: Download kyverno images archive
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
@ -123,7 +141,7 @@ jobs:
run: make kind-load-image-archive run: make kind-load-image-archive
- name: Install kyverno - name: Install kyverno
run: | run: |
export USE_CONFIG=standard,force-failure-policy-ignore export USE_CONFIG=${{ join(matrix.config.values, ',') }}
make kind-install-kyverno make kind-install-kyverno
- name: Wait for kyverno ready - name: Wait for kyverno ready
uses: ./.github/actions/kyverno-wait-ready uses: ./.github/actions/kyverno-wait-ready
@ -136,20 +154,28 @@ jobs:
uses: ./.github/actions/kyverno-logs uses: ./.github/actions/kyverno-logs
# runs conformance test suites with configuration: # runs conformance test suites with configuration:
# - default
default: default:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
config:
- name: default
values:
- default
k8s-version: k8s-version:
- v1.24.7 - name: v1.24
- v1.25.3 version: v1.24.7
- v1.26.0 - name: v1.25
- v1.27.0 version: v1.25.3
- name: v1.26
version: v1.26.0
- name: v1.27
version: v1.27.0
tests: tests:
- rbac - rbac
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: prepare-images needs: prepare-images
name: ${{ matrix.k8s-version.name }} - ${{ matrix.config.name }} - ${{ matrix.tests }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
@ -159,7 +185,7 @@ jobs:
build-cache-key: run-conformance build-cache-key: run-conformance
- name: Create kind cluster - name: Create kind cluster
run: | run: |
export KIND_IMAGE=kindest/node:${{ matrix.k8s-version }} export KIND_IMAGE=kindest/node:${{ matrix.k8s-version.version }}
make kind-create-cluster make kind-create-cluster
- name: Download kyverno images archive - name: Download kyverno images archive
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
@ -169,7 +195,7 @@ jobs:
run: make kind-load-image-archive run: make kind-load-image-archive
- name: Install kyverno - name: Install kyverno
run: | run: |
export USE_CONFIG=default export USE_CONFIG=${{ join(matrix.config.values, ',') }}
make kind-install-kyverno make kind-install-kyverno
- name: Wait for kyverno ready - name: Wait for kyverno ready
uses: ./.github/actions/kyverno-wait-ready uses: ./.github/actions/kyverno-wait-ready