-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: cleanup unused scripts, update make manifests (#569)
* chore: cleanup unused scripts, update make manifets Signed-off-by: Abhinandan Purkait <[email protected]> * chore: generate operator from helm template Signed-off-by: Abhinandan Purkait <[email protected]> * ci: add manifests and codegen validation in pull request Signed-off-by: Abhinandan Purkait <[email protected]> * chore: add comments on the generate-manifests script Signed-off-by: Abhinandan Purkait <[email protected]> * chore: generate zfs-operator by disabling helm labels Signed-off-by: Abhinandan Purkait <[email protected]> --------- Signed-off-by: Abhinandan Purkait <[email protected]>
- Loading branch information
1 parent
1e882fe
commit abd219f
Showing
26 changed files
with
2,161 additions
and
2,280 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
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 |
---|---|---|
|
@@ -33,6 +33,7 @@ jobs: | |
- uses: rrbutani/[email protected] | ||
with: | ||
file: shell.nix | ||
|
||
- name: Check if the chart follows a valid semver version | ||
run: | | ||
branch_name="${{ github.event.pull_request.base.ref }}" | ||
|
@@ -42,12 +43,50 @@ jobs: | |
run: | | ||
ct lint --config ct.yaml | ||
validate_codegen: | ||
runs-on: ubuntu-latest | ||
env: | ||
GOPATH: ${{ github.workspace }}/go | ||
GOBIN: ${{ github.workspace }}/go/bin | ||
defaults: | ||
run: | ||
working-directory: ${{ env.GOPATH }}/src/github.com/openebs/zfs-localpv | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ${{ env.GOPATH }}/src/github.com/openebs/zfs-localpv | ||
|
||
- name: Set up Go 1.19 | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.19.9 | ||
cache: false | ||
|
||
- name: Helm tool installer | ||
uses: Azure/[email protected] | ||
|
||
- name: Verify kubegen | ||
run: | | ||
make verify-kubegen | ||
- name: Verify manifests | ||
run: | | ||
make verify-manifests | ||
unit-tests: | ||
runs-on: ubuntu-latest | ||
needs: ["lint", "validate_codegen"] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go 1.19 | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.19.9 | ||
cache: false | ||
|
||
- name: Unit test | ||
run: make test | ||
|
||
|
@@ -118,7 +157,7 @@ jobs: | |
|
||
csi-driver: | ||
runs-on: ubuntu-latest | ||
needs: ["lint", "bdd-tests"] | ||
needs: ["bdd-tests"] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
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
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 |
---|---|---|
|
@@ -125,7 +125,7 @@ bootstrap: controller-gen | |
|
||
.PHONY: controller-gen | ||
controller-gen: | ||
TMP_DIR=$(shell mktemp -d) && cd $$TMP_DIR && go mod init tmp && go install -mod=mod sigs.k8s.io/controller-tools/cmd/[email protected] && rm -rf $$TMP_DIR; | ||
@go install -mod=mod sigs.k8s.io/controller-tools/cmd/[email protected] | ||
|
||
# SRC_PKG is the path of code files | ||
SRC_PKG := github.com/openebs/zfs-localpv/pkg | ||
|
@@ -144,7 +144,7 @@ kubegendelete: | |
|
||
.PHONY: deepcopy-install | ||
deepcopy-install: | ||
@go install -mod=mod k8s.io/code-generator/cmd/deepcopy-gen | ||
@go install -mod=mod k8s.io/code-generator/cmd/deepcopy-gen@v0.27.2 | ||
|
||
.PHONY: deepcopy | ||
deepcopy: | ||
|
@@ -156,7 +156,7 @@ deepcopy: | |
|
||
.PHONY: clientset-install | ||
clientset-install: | ||
@go install -mod=mod k8s.io/code-generator/cmd/client-gen | ||
@go install -mod=mod k8s.io/code-generator/cmd/client-gen@v0.27.2 | ||
|
||
.PHONY: clientset | ||
clientset: | ||
|
@@ -170,7 +170,7 @@ clientset: | |
|
||
.PHONY: lister-install | ||
lister-install: | ||
@go install -mod=mod k8s.io/code-generator/cmd/lister-gen | ||
@go install -mod=mod k8s.io/code-generator/cmd/lister-gen@v0.27.2 | ||
|
||
.PHONY: lister | ||
lister: | ||
|
@@ -182,7 +182,7 @@ lister: | |
|
||
.PHONY: informer-install | ||
informer-install: | ||
@go install -mod=mod k8s.io/code-generator/cmd/informer-gen | ||
@go install -mod=mod k8s.io/code-generator/cmd/informer-gen@v0.27.2 | ||
|
||
.PHONY: informer | ||
informer: | ||
|
@@ -236,4 +236,14 @@ golint: | |
@echo "--------------------------------" | ||
@echo "" | ||
|
||
.PHONY: verify-manifests | ||
verify-manifests: bootstrap manifests | ||
@./buildscripts/check-diff.sh | ||
@echo "Completed verify-manifests no changes detected !!" | ||
|
||
.PHONY: verify-kubegen | ||
verify-kubegen: bootstrap kubegen | ||
@./buildscripts/check-diff.sh | ||
@echo "Completed verify-codegen no changes detected !!" | ||
|
||
include Makefile.buildx.mk |
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
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
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
git --no-pager diff --exit-code pkg/generated pkg/apis deploy/yamls |
Oops, something went wrong.