From 846a8e259d04dfa2a787ffab5a6e174222095e68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charles-Edouard=20Br=C3=A9t=C3=A9ch=C3=A9?= Date: Sat, 28 Oct 2023 23:52:55 +0200 Subject: [PATCH 1/4] chore: rename release-notes folder to .release-notes (#143) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Charles-Edouard Brétéché --- {release-notes => .release-notes}/_template.md | 0 {release-notes => .release-notes}/main.md | 0 {release-notes => .release-notes}/v0.0.1.md | 0 docs/dev/release/README.md | 4 ++-- 4 files changed, 2 insertions(+), 2 deletions(-) rename {release-notes => .release-notes}/_template.md (100%) rename {release-notes => .release-notes}/main.md (100%) rename {release-notes => .release-notes}/v0.0.1.md (100%) diff --git a/release-notes/_template.md b/.release-notes/_template.md similarity index 100% rename from release-notes/_template.md rename to .release-notes/_template.md diff --git a/release-notes/main.md b/.release-notes/main.md similarity index 100% rename from release-notes/main.md rename to .release-notes/main.md diff --git a/release-notes/v0.0.1.md b/.release-notes/v0.0.1.md similarity index 100% rename from release-notes/v0.0.1.md rename to .release-notes/v0.0.1.md diff --git a/docs/dev/release/README.md b/docs/dev/release/README.md index e9e8039d..3529fbc6 100644 --- a/docs/dev/release/README.md +++ b/docs/dev/release/README.md @@ -18,8 +18,8 @@ git push origin $TAG ## Release notes -Release notes for the `main` branch lives in [main.md](../../release-notes/main.md). +Release notes for the `main` branch lives in [main.md](../../.release-notes/main.md). Make sure it is up to date and rename the file to the version being released. -You can then copy [_template.md](../../release-notes/_template.md) to [main.md](../../release-notes/main.md) for the next release. +You can then copy [_template.md](../../.release-notes/_template.md) to [main.md](../../.release-notes/main.md) for the next release. From f430cab04e96fabddcdcbe19f170ee290a436ee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charles-Edouard=20Br=C3=A9t=C3=A9ch=C3=A9?= Date: Sat, 28 Oct 2023 23:58:57 +0200 Subject: [PATCH 2/4] chore: add json schemas on workflows (#144) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Charles-Edouard Brétéché --- .github/workflows/ah-lint.yaml | 2 ++ .github/workflows/check-actions.yaml | 2 ++ .github/workflows/codegen.yaml | 2 ++ .github/workflows/ct-lint.yaml | 2 ++ .github/workflows/helm-install.yaml | 2 ++ .github/workflows/lint.yaml | 2 ++ .github/workflows/release.yaml | 2 ++ .github/workflows/tests.yaml | 2 ++ 8 files changed, 16 insertions(+) diff --git a/.github/workflows/ah-lint.yaml b/.github/workflows/ah-lint.yaml index adc05d75..7ca39b76 100644 --- a/.github/workflows/ah-lint.yaml +++ b/.github/workflows/ah-lint.yaml @@ -1,3 +1,5 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json + name: ArtifactHub Lint # permissions: {} diff --git a/.github/workflows/check-actions.yaml b/.github/workflows/check-actions.yaml index 3fb1da97..ec57946b 100644 --- a/.github/workflows/check-actions.yaml +++ b/.github/workflows/check-actions.yaml @@ -1,3 +1,5 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json + name: Check actions # permissions: {} diff --git a/.github/workflows/codegen.yaml b/.github/workflows/codegen.yaml index 92633d26..c31b4f5c 100644 --- a/.github/workflows/codegen.yaml +++ b/.github/workflows/codegen.yaml @@ -1,3 +1,5 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json + name: Verify codegen # permissions: {} diff --git a/.github/workflows/ct-lint.yaml b/.github/workflows/ct-lint.yaml index 738fb56f..42ca8f0c 100644 --- a/.github/workflows/ct-lint.yaml +++ b/.github/workflows/ct-lint.yaml @@ -1,3 +1,5 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json + name: CT Lint # permissions: {} diff --git a/.github/workflows/helm-install.yaml b/.github/workflows/helm-install.yaml index 01da90ad..01605eb3 100644 --- a/.github/workflows/helm-install.yaml +++ b/.github/workflows/helm-install.yaml @@ -1,3 +1,5 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json + name: Helm install # permissions: {} diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index a3bbf66f..b9405008 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -1,3 +1,5 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json + name: Lint # permissions: {} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 20e0ddab..d21a0b08 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,3 +1,5 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json + name: Release on: diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 89108f0c..05a06d19 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -1,3 +1,5 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json + name: Tests # permissions: {} From a4d67fab2c3fba4849e9c8333b67cbaba587ec9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charles-Edouard=20Br=C3=A9t=C3=A9ch=C3=A9?= Date: Sun, 29 Oct 2023 00:12:39 +0200 Subject: [PATCH 3/4] chore: move main at the root of the repo (#145) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Charles-Edouard Brétéché --- Makefile | 9 ++++----- cmd/cli/main.go => main.go | 0 2 files changed, 4 insertions(+), 5 deletions(-) rename cmd/cli/main.go => main.go (100%) diff --git a/Makefile b/Makefile index 28a121b9..5a49bcc2 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,6 @@ KO_REGISTRY := ko.local KO_PLATFORMS := all KO_TAGS := $(GIT_SHA) KO_CACHE ?= /tmp/ko-cache -CLI_DIR := cmd/cli CLI_BIN := kyverno-json ######### @@ -122,7 +121,7 @@ vet: ## Run go vet $(CLI_BIN): fmt vet build-wasm codegen-crds codegen-deepcopy codegen-register codegen-client codegen-playground @echo Build cli binary... >&2 - @CGO_ENABLED=$(CGO_ENABLED) GOOS=$(GOOS) go build -o ./$(CLI_BIN) -ldflags=$(LD_FLAGS) ./$(CLI_DIR) + @CGO_ENABLED=$(CGO_ENABLED) GOOS=$(GOOS) go build -o ./$(CLI_BIN) -ldflags=$(LD_FLAGS) . .PHONY: build build: $(CLI_BIN) ## Build @@ -141,7 +140,7 @@ serve-playground: $(CLI_BIN) ## Serve playground ko-build: $(KO) ## Build image (with ko) @echo Build image with ko... >&2 @LDFLAGS=$(LD_FLAGS) KOCACHE=$(KO_CACHE) KO_DOCKER_REPO=$(KO_REGISTRY) \ - $(KO) build ./$(CLI_DIR) --preserve-import-paths --tags=$(KO_TAGS) --platform=$(LOCAL_PLATFORM) + $(KO) build . --preserve-import-paths --tags=$(KO_TAGS) --platform=$(LOCAL_PLATFORM) ########### # CODEGEN # @@ -334,14 +333,14 @@ kind-delete: $(KIND) ## Delete kind cluster .PHONY: kind-load kind-load: $(KIND) ko-build ## Build image and load in kind cluster @echo Load image... >&2 - @$(KIND) load docker-image --name $(KIND_NAME) $(KO_REGISTRY)/$(PACKAGE)/$(CLI_DIR):$(GIT_SHA) + @$(KIND) load docker-image --name $(KIND_NAME) $(KO_REGISTRY)/$(PACKAGE):$(GIT_SHA) .PHONY: kind-install kind-install: $(HELM) kind-load ## Build image, load it in kind cluster and deploy helm chart @echo Install chart... >&2 @$(HELM) upgrade --install kyverno-json --namespace kyverno-json --create-namespace --wait ./charts/kyverno-json \ --set image.registry=$(KO_REGISTRY) \ - --set image.repository=$(PACKAGE)/$(CLI_DIR) \ + --set image.repository=$(PACKAGE) \ --set image.tag=$(GIT_SHA) ########### diff --git a/cmd/cli/main.go b/main.go similarity index 100% rename from cmd/cli/main.go rename to main.go From f582e3088740bc69ab9f2c7069ad48278ce74ff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charles-Edouard=20Br=C3=A9t=C3=A9ch=C3=A9?= Date: Sun, 29 Oct 2023 00:12:53 +0200 Subject: [PATCH 4/4] refactor: move wasm folder out of cmd (#147) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Charles-Edouard Brétéché --- Makefile | 2 +- {cmd/wasm => wasm}/main.go | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename {cmd/wasm => wasm}/main.go (100%) diff --git a/Makefile b/Makefile index 5a49bcc2..89184bd0 100644 --- a/Makefile +++ b/Makefile @@ -129,7 +129,7 @@ build: $(CLI_BIN) ## Build .PHONY: build-wasm build-wasm: fmt vet codegen-crds codegen-deepcopy codegen-register codegen-client ## Build the wasm binary @echo Build wasm module... >&2 - @GOOS=js GOARCH=wasm go build -o ./website/playground/assets/main.wasm -ldflags=$(LD_FLAGS) ./cmd/wasm/main.go + @GOOS=js GOARCH=wasm go build -o ./website/playground/assets/main.wasm -ldflags=$(LD_FLAGS) ./wasm/main.go .PHONY: serve-playground serve-playground: $(CLI_BIN) ## Serve playground diff --git a/cmd/wasm/main.go b/wasm/main.go similarity index 100% rename from cmd/wasm/main.go rename to wasm/main.go