Skip to content

Commit

Permalink
Merge branch 'main' into enforce_Enforce
Browse files Browse the repository at this point in the history
  • Loading branch information
JimBugwadia authored Oct 31, 2024
2 parents 79da228 + 84480f4 commit c518af0
Show file tree
Hide file tree
Showing 20 changed files with 757 additions and 1,317 deletions.
22 changes: 18 additions & 4 deletions .github/actions/run-tests/action.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@
name: "Runs E2E Tests"
description: "Runs E2E tests using chainsaw"
inputs:
path:
description: Tests path
default: '.'
tests:
description: "Test regex"
required: true
default: ''
shard-index:
description: Shard index
default: '0'
shard-count:
description: Shard count
default: '0'
runs:
using: "composite"
steps:
- name: Install Cosign
uses: sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # v3.6.0
uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0
- name: Install Chainsaw
uses: kyverno/action-install-chainsaw@d1a61148c0437a66760d11d8575332305c2234cb # v0.2.10
uses: kyverno/action-install-chainsaw@d311eacde764f806c9658574ff64c9c3b21f8397 # v0.2.11
with:
verify: true
- name: Test with Chainsaw
shell: bash
run: |
set -e
chainsaw test --config .chainsaw.yaml --include-test-regex '^chainsaw$/${{ inputs.tests }}' --no-color=false
chainsaw test ${{ inputs.path }} \
--config .chainsaw.yaml \
--include-test-regex '^chainsaw$/${{ inputs.tests }}' \
--shard-index ${{ inputs.shard-index }} \
--shard-count ${{ inputs.shard-count }} \
--no-color=false
2 changes: 1 addition & 1 deletion .github/actions/setup-env/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ runs:
using: "composite"
steps:
- name: Setup Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: ~1.21.1
- name: Install Tools
Expand Down
66 changes: 0 additions & 66 deletions .github/workflows/cel-test.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/check-actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Ensure SHA pinned actions
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@b8f9a25a51fe633d9215ac7734854dc11cd299cb # v3.0.13
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@ed00f72a3ca5b6eff8ad4d3ffdcacedb67a21db1 # v3.0.15
with:
allowlist: |
kyverno/chainsaw
34 changes: 0 additions & 34 deletions .github/workflows/check-codegen.yml

This file was deleted.

14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
options: --user root
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: policies
- name: Run ah lint
Expand All @@ -31,21 +31,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: policies
- name: Validate all policies
run: ./.hack/verify-files-structure.sh
working-directory: policies
- name: Clone Kyverno
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: kyverno/kyverno
path: kyverno
# The target branch of a pull request or the branch/tag of a push
ref: ${{ github.base_ref || github.ref_name }}
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: ~1.21.1
- name: Test Policy
Expand All @@ -56,18 +56,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: policies
- name: Checkout Kyverno
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: kyverno/kyverno
path: kyverno
# The target branch of a pull request or the branch/tag of a push
ref: ${{ github.base_ref || github.ref_name }}
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: ~1.21.1
- name: Lint policies
Expand Down
Loading

0 comments on commit c518af0

Please sign in to comment.