Skip to content

Commit 5de2030

Browse files
committed
use ko instead for simplicity
1 parent db20faa commit 5de2030

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

Makefile

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
REGISTRY?=gcr.io/k8s-minikube
2-
VERSION=v0.0.3
2+
VERSION=20210202-test2
3+
GOOS?=$(shell go env GOOS)
34

45
build: ## Build the gcp-auth-webhook binary
5-
CGO_ENABLED=0 GOOS=linux go build -o out/gcp-auth-webhook -ldflags=$(PROVISIONER_LDFLAGS) server.go
6+
CGO_ENABLED=0 GOOS=linux go build -o out/gcp-auth-webhook server.go
67

78
.PHONY: image
8-
image: build ## Create the multiarch manifest builder
9-
env DOCKER_CLI_EXPERIMENTAL=enabled docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
10-
env DOCKER_CLI_EXPERIMENTAL=enabled docker buildx rm --builder gcp-auth-builder || true
11-
env DOCKER_CLI_EXPERIMENTAL=enabled docker buildx create --name gcp-auth-builder --use
12-
13-
14-
.PHONY: push
15-
push: image ## Push the manifest and images up to the registry
16-
env DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build --platform linux/arm64,linux/amd64 -t $(REGISTRY)/gcp-auth-webhook:$(VERSION) --push -f Dockerfile ./out
17-
9+
image: build ## Create and push multiarch manifest and images
10+
curl -L https://github.com/google/ko/releases/download/v0.8.0/ko_0.8.0_$(GOOS)_x86_64.tar.gz | tar xzf - ko && chmod +x ./ko
11+
KO_DOCKER_REPO=$(REGISTRY) ./ko publish -B . --platform all -t $(VERSION)
12+
rm ./ko

0 commit comments

Comments
 (0)