-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(kubernetes-ci): use
kubectl-validate
instead of Azure/k8s-lint
Signed-off-by: Siddhesh Mhadnak <[email protected]>
- Loading branch information
Showing
4 changed files
with
4,526 additions
and
40 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,45 @@ | ||
name: "CI - Kubernetes" | ||
--- | ||
name: CI - Kubernetes | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
lint: | ||
name: "Lint manifests" | ||
name: Lint manifests | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
kubernetes-version: | ||
- '1.27' | ||
|
||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: "Checkout code" | ||
uses: actions/checkout@v4 | ||
|
||
- id: manifest-files | ||
name: "Find manifest files" | ||
run: | | ||
echo "manifests<<EOF" >> $GITHUB_OUTPUT | ||
python scripts/find_manifests.py >> $GITHUB_OUTPUT | ||
echo "EOF" >> $GITHUB_OUTPUT | ||
- uses: azure/[email protected] | ||
- name: Checkout code | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 | ||
with: | ||
manifests: ${{ steps.manifest-files.outputs.manifests }} | ||
go-version: '1.21' | ||
|
||
- name: Install `kubectl-validate` | ||
run: go install -ldflags='-s -w' -race -trimpath sigs.k8s.io/kubectl-validate@latest | ||
|
||
- name: Lint manifests | ||
run: |- | ||
kubectl-validate kubernetes/manifests/ \ | ||
--local-crds kubernetes/crds/ \ | ||
--version '${{ matrix.kubernetes-version }}' |
Oops, something went wrong.