From 2110a4e66240a9b33ab05fe727a3a59e0514c4da Mon Sep 17 00:00:00 2001 From: khanhtc1202 Date: Fri, 12 Sep 2025 12:19:10 +0900 Subject: [PATCH] Refine local environment commands in makefile Signed-off-by: khanhtc1202 --- Makefile | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 1c2d0b9389..d7456ff105 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,8 @@ # gen: execute code or docs generation # release: commands used in release flow # push: push artifacts such as helm chart +# up: prepare local environment (registry, kind cluster) +# down: shutdown/cleanup local environment (registry, kind cluster) #################### # Build commands @@ -277,8 +279,7 @@ release/pick: release/docs: ./hack/gen-release-docs.sh $(version) -# Other commands - +# Local environment commands .PHONY: up/local-registry up/local-registry: ./hack/create-local-registry.sh @@ -290,11 +291,19 @@ up/kind-cluster: .PHONY: up/local-cluster up/local-cluster: up/local-registry up/kind-cluster -.PHONY: down/local-cluster -down/local-cluster: +.PHONY: down/kind-cluster +down/kind-cluster: kind delete cluster --name pipecd + +.PHONY: down/local-registry +down/local-registry: docker container rm -f kind-registry 2>/dev/null +.PHONY: down/local-cluster +down/local-cluster: down/kind-cluster down/local-registry + +# Other commands + .PHONY: setup-envtest # Where to install the setup-envtest binary setup-envtest: export GOBIN ?= ${PWD}/.dev/bin