mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-05 17:27:51 +00:00
Update Makefile to support s390x
Updated Makefile to include changes to the docker-build step, to add support for s390x.
This commit is contained in:
parent
83a7dd5d5e
commit
5e307fb2b4
1 changed files with 3 additions and 1 deletions
4
Makefile
4
Makefile
|
|
@ -8,6 +8,7 @@ OUT_DIR?=./_output
|
|||
VENDOR_DOCKERIZED=0
|
||||
|
||||
VERSION?=latest
|
||||
GOIMAGE=golang:1.8
|
||||
|
||||
ifeq ($(ARCH),amd64)
|
||||
BASEIMAGE?=busybox
|
||||
|
|
@ -23,6 +24,7 @@ ifeq ($(ARCH),ppc64le)
|
|||
endif
|
||||
ifeq ($(ARCH),s390x)
|
||||
BASEIMAGE?=s390x/busybox
|
||||
GOIMAGE=s390x/golang:1.8
|
||||
endif
|
||||
|
||||
.PHONY: all build docker-build push-% push test verify-gofmt gofmt verify
|
||||
|
|
@ -35,7 +37,7 @@ docker-build: vendor
|
|||
cp deploy/Dockerfile $(TEMP_DIR)
|
||||
cd $(TEMP_DIR) && sed -i "s|BASEIMAGE|$(BASEIMAGE)|g" Dockerfile
|
||||
|
||||
docker run -it -v $(TEMP_DIR):/build -v $(shell pwd):/go/src/github.com/directxman12/k8s-prometheus-adapter -e GOARCH=$(ARCH) golang:1.8 /bin/bash -c "\
|
||||
docker run -it -v $(TEMP_DIR):/build -v $(shell pwd):/go/src/github.com/directxman12/k8s-prometheus-adapter -e GOARCH=$(ARCH) $(GOIMAGE) /bin/bash -c "\
|
||||
CGO_ENABLED=0 go build -a -tags netgo -o /build/adapter github.com/directxman12/k8s-prometheus-adapter/cmd/adapter"
|
||||
|
||||
docker build -t $(REGISTRY)/$(IMAGE)-$(ARCH):$(VERSION) $(TEMP_DIR)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue