From 1013fe98c2a0c135607155b0f960ce6c292e25e4 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Thu, 26 Jul 2018 06:59:32 -0400 Subject: [PATCH] Update webhook test image to multi-arch --- test/images/webhook/BASEIMAGE | 4 ++++ test/images/webhook/Dockerfile | 2 +- test/images/webhook/Makefile | 18 ++++++++++-------- test/images/webhook/VERSION | 1 + 4 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 test/images/webhook/BASEIMAGE create mode 100644 test/images/webhook/VERSION diff --git a/test/images/webhook/BASEIMAGE b/test/images/webhook/BASEIMAGE new file mode 100644 index 0000000000..114844f395 --- /dev/null +++ b/test/images/webhook/BASEIMAGE @@ -0,0 +1,4 @@ +amd64=alpine:3.6 +arm=arm32v6/alpine:3.6 +arm64=arm64v8/alpine:3.6 +ppc64le=ppc64le/alpine:3.6 diff --git a/test/images/webhook/Dockerfile b/test/images/webhook/Dockerfile index 2a43f424b2..6578f321b3 100644 --- a/test/images/webhook/Dockerfile +++ b/test/images/webhook/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM alpine:latest +FROM BASEIMAGE ADD webhook /webhook ENTRYPOINT ["/webhook"] diff --git a/test/images/webhook/Makefile b/test/images/webhook/Makefile index cf4009def1..e5e604c275 100644 --- a/test/images/webhook/Makefile +++ b/test/images/webhook/Makefile @@ -12,12 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -IMAGE = gcr.io/kubernetes-e2e-test-images/k8s-sample-admission-webhook-amd64 -TAG = 1.10v2 +SRCS=webhook +ARCH ?= amd64 +TARGET ?= $(CURDIR) +GOLANG_VERSION ?= latest +SRC_DIR = $(notdir $(shell pwd)) +export -build: - CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o webhook . - docker build --no-cache -t $(IMAGE):$(TAG) . - rm -rf webhook -push: - docker push $(IMAGE):$(TAG) +bin: + ../image-util.sh bin $(SRCS) + +.PHONY: bin diff --git a/test/images/webhook/VERSION b/test/images/webhook/VERSION new file mode 100644 index 0000000000..f766b5eefe --- /dev/null +++ b/test/images/webhook/VERSION @@ -0,0 +1 @@ +1.10v2