From 75fc60b032d84b9af066b0437802932e0cff93a6 Mon Sep 17 00:00:00 2001 From: khanhtc1202 Date: Tue, 10 Dec 2024 11:22:56 +0700 Subject: [PATCH 1/2] Add plugins build command to makefile Signed-off-by: khanhtc1202 --- Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Makefile b/Makefile index 19c852d7f1..34bf1d4d76 100644 --- a/Makefile +++ b/Makefile @@ -55,6 +55,21 @@ else helm package manifests/$(MOD) --version $(VERSION) --app-version $(VERSION) --dependency-update --destination .artifacts endif +.PHONY: build/plugin +build/plugin: PLUGINS ?= "" # comma separated list of plugins. eg: PLUGINS=kubernetes,ecs,lambda +build/plugin: PLUGINS_BIN_DIR ?= ~/.pipecd/plugins +build/plugin: PLUGINS_SRC_DIR ?= ./pkg/app/pipedv1/plugin +build/plugin: PLUGINS_OUT_DIR ?= ./.artifacts/plugins +build/plugin: + mkdir -p $(PLUGINS_BIN_DIR) + @echo "Building plugins..." + @for plugin in $(shell echo $(PLUGINS) | tr ',' ' '); do \ + echo "Building plugin: $$plugin"; \ + go build -o $(PLUGINS_OUT_DIR)/$$plugin $(PLUGINS_SRC_DIR)/$$plugin \ + && cp $(PLUGINS_OUT_DIR)/$$plugin $(PLUGINS_BIN_DIR)/$$plugin; \ + done + @echo "Plugins are built and copied to $(PLUGINS_BIN_DIR)" + .PHONY: push push/chart: BUCKET ?= charts.pipecd.dev push/chart: VERSION ?= $(shell git describe --tags --always --dirty --abbrev=7) From 3fc60cea777aae5989d26bf1951047a19dc6a264 Mon Sep 17 00:00:00 2001 From: Khanh Tran <32532742+khanhtc1202@users.noreply.github.com> Date: Tue, 10 Dec 2024 11:47:52 +0700 Subject: [PATCH 2/2] Update Makefile Co-authored-by: Shinnosuke Sawada-Dazai Signed-off-by: Khanh Tran <32532742+khanhtc1202@users.noreply.github.com> --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 34bf1d4d76..dee19161a5 100644 --- a/Makefile +++ b/Makefile @@ -57,7 +57,7 @@ endif .PHONY: build/plugin build/plugin: PLUGINS ?= "" # comma separated list of plugins. eg: PLUGINS=kubernetes,ecs,lambda -build/plugin: PLUGINS_BIN_DIR ?= ~/.pipecd/plugins +build/plugin: PLUGINS_BIN_DIR ?= ~/.piped/plugins build/plugin: PLUGINS_SRC_DIR ?= ./pkg/app/pipedv1/plugin build/plugin: PLUGINS_OUT_DIR ?= ./.artifacts/plugins build/plugin: