Skip to content

Commit

Permalink
Merge branch 'main' into generate-foreach-4
Browse files Browse the repository at this point in the history
  • Loading branch information
realshuting authored Sep 3, 2024
2 parents 968a797 + 8e35198 commit d71404c
Show file tree
Hide file tree
Showing 28 changed files with 1,342 additions and 464 deletions.
31 changes: 3 additions & 28 deletions .github/ISSUE_TEMPLATE/bug-webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,37 +13,17 @@ body:
label: Kyverno Version
description: What version of Kyverno are you running?
options:
- 1.8.0
- 1.8.1
- 1.8.2
- 1.8.3
- 1.8.4
- 1.8.5
- 1.9.0
- 1.9.1
- 1.9.2
- 1.9.3
- 1.9.4
- 1.9.5
- 1.10.0
- 1.10.1
- 1.10.2
- 1.10.3
- 1.10.4
- 1.10.5
- 1.10.6
- 1.11.0
- 1.11.1
- 1.11.2
- 1.11.3
- 1.11.4
- 1.11.5
- 1.12.0
- 1.12.1
- 1.12.2
- 1.12.3
- 1.12.4
- 1.12.5
- 1.13.0
validations:
required: true
- type: dropdown
Expand All @@ -52,15 +32,10 @@ body:
label: Kubernetes Version
description: What version of Kubernetes are you running?
options:
- 1.21.x
- 1.22.x
- 1.23.x
- 1.24.x
- 1.25.x
- 1.26.x
- 1.27.x
- 1.28.x
- 1.29.x
- 1.30.x
- 1.31.x
validations:
required: true
- type: dropdown
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/publish-image/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ runs:
with:
version: v1
args: app -licenses -json -output ${{ inputs.sbom-name }}-bom.cdx.json -main ${{ inputs.main-path }}
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: ${{ inputs.sbom-name }}-bom-cdx
path: ${{ inputs.sbom-name }}-bom.cdx.json
Expand Down
68 changes: 68 additions & 0 deletions .github/actions/run-tests/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Runs E2E Tests
description: Runs E2E tests using chainsaw
inputs:
k8s-version:
description: Kubernetes version
required: true
kind-config:
description: Kind cluster config
default: ./scripts/config/kind/default.yaml
kyverno-configs:
description: Kyverno configs
default: standard
token:
description: GH token
required: true
chainsaw-config:
description: Chainsaw config
default: ../../../.chainsaw.yaml
chainsaw-tests:
description: Test regex
required: true
runs:
using: composite
steps:
# install tools
- name: Install helm
id: helm
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
- name: Install chainsaw
uses: kyverno/action-install-chainsaw@82d8e747037f840e0ef9bdd97ecdc617f5535bdc # v0.2.8
# create cluster
- name: Create kind cluster
uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0
with:
node_image: kindest/node:${{ inputs.k8s-version }}
cluster_name: kind
config: ${{ inputs.kind-config }}
# deploy kyverno
- name: Download kyverno images archive
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: kyverno.tar
- name: Load kyverno images archive in kind cluster
shell: bash
run: |
set -e
kind load image-archive kyverno.tar --name kind
- name: Install kyverno
shell: bash
run: |
set -e
export HELM=${{ steps.helm.outputs.helm-path }}
export USE_CONFIG=${{ inputs.kyverno-configs }}
make kind-install-kyverno
- name: Wait for kyverno ready
uses: ./.github/actions/kyverno-wait-ready
# run tests
- name: Test with Chainsaw
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.token }}
run: |
set -e
cd ./test/conformance/chainsaw && chainsaw test --include-test-regex '^chainsaw$/${{ inputs.chainsaw-tests }}' --config ${{ inputs.chainsaw-config }}
# debug
- name: Debug failure
if: failure()
uses: ./.github/actions/kyverno-logs
4 changes: 2 additions & 2 deletions .github/actions/setup-build-env/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ inputs:
runs:
using: composite
steps:
- uses: jlumbroso/free-disk-space@76866dbe54312617f00798d1762df7f43def6e5c # v1.2.0
- uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
if: ${{ inputs.free-disk-space == 'true' }}
with:
tool-cache: true
Expand All @@ -26,7 +26,7 @@ runs:
if: ${{ inputs.unshallow == 'true' }}
run: |
git fetch --prune --unshallow
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: ~1.22.4
- shell: bash
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/setup-caches/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ inputs:
runs:
using: composite
steps:
- uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # v3.2.2
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('**/go.sum') }}-${{ hashFiles('Makefile') }}
- uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # v3.2.2
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/.cache/kyverno/tools
key: ${{ runner.os }}-cache-kyverno-tools-${{ hashFiles('**/go.sum') }}-${{ hashFiles('Makefile') }}
- uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # v3.2.2
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
if: ${{ inputs.build-cache-key }}
with:
path: ~/.cache/go-build
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-test-env/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ inputs:
runs:
using: composite
steps:
- uses: jlumbroso/free-disk-space@76866dbe54312617f00798d1762df7f43def6e5c # v1.2.0
- uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
if: ${{ inputs.free-disk-space == 'true' }}
with:
tool-cache: true
Expand Down
4 changes: 3 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ updates:
interval: daily
rebase-strategy: disabled
- package-ecosystem: github-actions
directory: /
directories:
- /
- /.github/actions/*/
schedule:
interval: daily
rebase-strategy: disabled
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clean-stale-branches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Cleanup Stale Branches
uses: cbrgm/cleanup-stale-branches-action@3a038290b56a3936cb9666a3f48adb3b6af7e583 # v1.1.20
uses: cbrgm/cleanup-stale-branches-action@07d311426eed2eff32c70ca5f8b47297ce7469e9 # v1.1.21
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codecov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Generate Code Coverage Report
run: make code-cov-report
- name: Upload coverage
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: coverage.out
path: coverage.out
Expand All @@ -52,7 +52,7 @@ jobs:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Download coverage
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: coverage.out
- name: Upload Report to Codecov
Expand Down
Loading

0 comments on commit d71404c

Please sign in to comment.