| giolekva | 11881b5 | 2021-11-27 16:51:58 +0400 | [diff] [blame^] | 1 | IMAGE_NAME := "giolekva/cert-manager-webhook-gandi" |
| 2 | IMAGE_TAG := "v0.2.0" |
| 3 | |
| 4 | checkout: |
| 5 | git clone --depth 1 --branch v0.2.0 https://github.com/bwolf/cert-manager-webhook-gandi.git |
| 6 | |
| 7 | clean: |
| 8 | rm -f webhook |
| 9 | |
| 10 | build: export CGO_ENABLED=0 |
| 11 | build: export GO111MODULE=on |
| 12 | build: clean |
| 13 | cd cert-manager-webhook-gandi && go build -o ../webhook -ldflags '-w -extldflags "-static"' . |
| 14 | |
| 15 | image: build |
| 16 | docker build --tag=$(IMAGE_NAME):$(IMAGE_TAG) . --platform=linux/arm64 |
| 17 | |
| 18 | push: image |
| 19 | docker push $(IMAGE_NAME):$(IMAGE_TAG) |
| 20 | |
| 21 | |
| 22 | push_arm64: export GOOS=linux |
| 23 | push_arm64: export GOARCH=arm64 |
| 24 | push_arm64: push |