From f63b7e05c843364140c1a62e79692aa2e41b034a Mon Sep 17 00:00:00 2001 From: Kostis Kapelonis Date: Thu, 16 Sep 2021 14:06:07 +0300 Subject: [PATCH] build: create windows version for CLI Signed-off-by: Kostis Kapelonis --- .github/workflows/release.yaml | 1 + Dockerfile | 2 +- Makefile | 5 +++++ hack/build-release-plugins.sh | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index cc1d94bf5d..1be95e3c36 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -129,6 +129,7 @@ jobs: files: | dist/kubectl-argo-rollouts-linux-amd64 dist/kubectl-argo-rollouts-darwin-amd64 + dist/kubectl-argo-rollouts-windows-amd64 manifests/install.yaml manifests/namespace-install.yaml env: diff --git a/Dockerfile b/Dockerfile index 5d1b3042b8..7212a9c8df 100644 --- a/Dockerfile +++ b/Dockerfile @@ -63,7 +63,7 @@ RUN touch ui/dist/node_modules.marker && \ touch ui/dist/app/index.html && \ find ui/dist -ARG MAKE_TARGET="controller plugin-linux plugin-darwin" +ARG MAKE_TARGET="controller plugin-linux plugin-darwin plugin-windows" RUN make ${MAKE_TARGET} #################################################################################################### diff --git a/Makefile b/Makefile index d0c77f7f83..2c2409ece6 100644 --- a/Makefile +++ b/Makefile @@ -197,6 +197,11 @@ plugin-darwin: ui/dist cp -r ui/dist/app/* server/static CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -v -i -ldflags '${LDFLAGS}' -o ${DIST_DIR}/${PLUGIN_CLI_NAME}-darwin-amd64 ./cmd/kubectl-argo-rollouts +.PHONY: plugin-windows +plugin-windows: ui/dist + cp -r ui/dist/app/* server/static + CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -v -i -ldflags '${LDFLAGS}' -o ${DIST_DIR}/${PLUGIN_CLI_NAME}-windows-amd64 ./cmd/kubectl-argo-rollouts + .PHONY: docs docs: go run ./hack/gen-docs/main.go diff --git a/hack/build-release-plugins.sh b/hack/build-release-plugins.sh index efc4f6b510..07f9b66ddc 100755 --- a/hack/build-release-plugins.sh +++ b/hack/build-release-plugins.sh @@ -10,7 +10,7 @@ docker build --iidfile ${rollout_iid_file} --target argo-rollouts-build . rollout_iid=$(cat ${rollout_iid_file}) container_id=$(docker create ${rollout_iid}) -for plat in linux-amd64 darwin-amd64 ; do +for plat in linux-amd64 darwin-amd64 windows-amd64; do docker cp ${container_id}:/go/src/github.com/argoproj/argo-rollouts/dist/kubectl-argo-rollouts-${plat} ${SRCROOT}/dist done docker rm -v ${container_id}