diff --git a/test/images/no-snat-test-proxy/BASEIMAGE b/test/images/no-snat-test-proxy/BASEIMAGE new file mode 100644 index 0000000000..114844f395 --- /dev/null +++ b/test/images/no-snat-test-proxy/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/no-snat-test-proxy/Dockerfile b/test/images/no-snat-test-proxy/Dockerfile index 232126642f..04a89a96bc 100644 --- a/test/images/no-snat-test-proxy/Dockerfile +++ b/test/images/no-snat-test-proxy/Dockerfile @@ -12,9 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM alpine:3.5 +FROM BASEIMAGE -ADD no-snat-test-proxy /usr/bin/no-snat-test-proxy -RUN chmod +x /usr/bin/no-snat-test-proxy +COPY no-snat-test-proxy / -ENTRYPOINT ["/usr/bin/no-snat-test-proxy"] \ No newline at end of file +ENTRYPOINT ["/no-snat-test-proxy"] diff --git a/test/images/no-snat-test-proxy/Makefile b/test/images/no-snat-test-proxy/Makefile index 8457932667..507a70a3d0 100644 --- a/test/images/no-snat-test-proxy/Makefile +++ b/test/images/no-snat-test-proxy/Makefile @@ -12,18 +12,16 @@ # See the License for the specific language governing permissions and # limitations under the License. -REGISTRY?=gcr.io/google_containers -REGISTRY_TAG?=1.0.1 -ARCH?=amd64 -NAME?=no-snat-test-proxy +BIN=no-snat-test-proxy +ARCH ?= amd64 +TARGET ?= $(CURDIR) +GOLANG_VERSION ?= latest -build: - go build --ldflags '-linkmode external -extldflags "-static"' -o $(NAME) main.go - docker build -t $(REGISTRY)/$(NAME)-$(ARCH):$(REGISTRY_TAG) . - rm $(NAME) +bin: + docker run --rm -it -v $(TARGET):$(TARGET):Z -v `pwd`/../../../:/go/src/k8s.io/kubernetes:Z \ + golang:$(GOLANG_VERSION) \ + /bin/bash -c "\ + cd /go/src/k8s.io/kubernetes/test/images/no-snat-test-proxy && \ + CGO_ENABLED=0 GOARM=$(GOARM) GOARCH=$(ARCH) go build -a -installsuffix cgo --ldflags '-w' -o $(TARGET)/$(BIN)" -push: build - gcloud docker -- push $(REGISTRY)/$(NAME)-$(ARCH):$(REGISTRY_TAG) - -all: build -.PHONY: build push \ No newline at end of file +.PHONY: bin diff --git a/test/images/no-snat-test-proxy/NAME b/test/images/no-snat-test-proxy/NAME new file mode 100644 index 0000000000..f7643dc3ab --- /dev/null +++ b/test/images/no-snat-test-proxy/NAME @@ -0,0 +1 @@ +no-snat-test-proxy diff --git a/test/images/no-snat-test-proxy/VERSION b/test/images/no-snat-test-proxy/VERSION new file mode 100644 index 0000000000..6d7de6e6ab --- /dev/null +++ b/test/images/no-snat-test-proxy/VERSION @@ -0,0 +1 @@ +1.0.2 diff --git a/test/images/no-snat-test/BASEIMAGE b/test/images/no-snat-test/BASEIMAGE new file mode 100644 index 0000000000..114844f395 --- /dev/null +++ b/test/images/no-snat-test/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/no-snat-test/Dockerfile b/test/images/no-snat-test/Dockerfile index 1cd01aafd4..b56749dbfa 100644 --- a/test/images/no-snat-test/Dockerfile +++ b/test/images/no-snat-test/Dockerfile @@ -12,9 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM alpine:3.5 +FROM BASEIMAGE -ADD no-snat-test /usr/bin/no-snat-test -RUN chmod +x /usr/bin/no-snat-test +COPY no-snat-test / -ENTRYPOINT ["/usr/bin/no-snat-test"] \ No newline at end of file +ENTRYPOINT ["/no-snat-test"] diff --git a/test/images/no-snat-test/Makefile b/test/images/no-snat-test/Makefile index 5ca0c23999..60e604cce9 100644 --- a/test/images/no-snat-test/Makefile +++ b/test/images/no-snat-test/Makefile @@ -12,18 +12,16 @@ # See the License for the specific language governing permissions and # limitations under the License. -REGISTRY?=gcr.io/google_containers -REGISTRY_TAG?=1.0.1 -ARCH?=amd64 -NAME?=no-snat-test +BIN=no-snat-test +ARCH ?= amd64 +TARGET ?= $(CURDIR) +GOLANG_VERSION ?= latest -build: - go build --ldflags '-linkmode external -extldflags "-static"' -o $(NAME) main.go - docker build -t $(REGISTRY)/$(NAME)-$(ARCH):$(REGISTRY_TAG) . - rm $(NAME) +bin: + docker run --rm -it -v $(TARGET):$(TARGET):Z -v `pwd`/../../../:/go/src/k8s.io/kubernetes:Z \ + golang:$(GOLANG_VERSION) \ + /bin/bash -c "\ + cd /go/src/k8s.io/kubernetes/test/images/no-snat-test && \ + CGO_ENABLED=0 GOARM=$(GOARM) GOARCH=$(ARCH) go build -a -installsuffix cgo --ldflags '-w' -o $(TARGET)/$(BIN)" -push: build - gcloud docker -- push $(REGISTRY)/$(NAME)-$(ARCH):$(REGISTRY_TAG) - -all: build -.PHONY: build push \ No newline at end of file +.PHONY: bin diff --git a/test/images/no-snat-test/NAME b/test/images/no-snat-test/NAME new file mode 100644 index 0000000000..97de61b865 --- /dev/null +++ b/test/images/no-snat-test/NAME @@ -0,0 +1 @@ +no-snat-test diff --git a/test/images/no-snat-test/VERSION b/test/images/no-snat-test/VERSION new file mode 100644 index 0000000000..6d7de6e6ab --- /dev/null +++ b/test/images/no-snat-test/VERSION @@ -0,0 +1 @@ +1.0.2 diff --git a/test/images/nvidia-cuda/BASEIMAGE b/test/images/nvidia-cuda/BASEIMAGE new file mode 100644 index 0000000000..a7b6d58706 --- /dev/null +++ b/test/images/nvidia-cuda/BASEIMAGE @@ -0,0 +1,2 @@ +amd64=nvidia/cuda:8.0-devel-ubuntu16.04 +ppc64le=nvidia/cuda-ppc64le:8.0-devel-ubuntu16.04 diff --git a/test/images/nvidia-cuda/Dockerfile b/test/images/nvidia-cuda/Dockerfile index 2d68b97f5f..c7b9cfdc31 100644 --- a/test/images/nvidia-cuda/Dockerfile +++ b/test/images/nvidia-cuda/Dockerfile @@ -12,7 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM nvidia/cuda:8.0-devel-ubuntu16.04 +FROM BASEIMAGE + +CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/ RUN apt-get update && apt-get install -y --no-install-recommends \ cuda-samples-$CUDA_PKG_VERSION && \ @@ -21,4 +23,4 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ WORKDIR /usr/local/cuda/samples/0_Simple/vectorAdd RUN make -CMD ./vectorAdd \ No newline at end of file +CMD ./vectorAdd diff --git a/test/images/nvidia-cuda/Makefile b/test/images/nvidia-cuda/Makefile deleted file mode 100644 index 616f796c66..0000000000 --- a/test/images/nvidia-cuda/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 2017 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -.PHONY: all push build - -TAG ?= v0.1 - -REGISTRY ?= gcr.io/google-containers -IMAGE = $(REGISTRY)/cuda-vector-add - -build: - docker build --pull -t $(IMAGE):$(TAG) . - -push: - gcloud docker -- push $(IMAGE):$(TAG) - -all: build diff --git a/test/images/nvidia-cuda/NAME b/test/images/nvidia-cuda/NAME new file mode 100644 index 0000000000..a3cf7cef8b --- /dev/null +++ b/test/images/nvidia-cuda/NAME @@ -0,0 +1 @@ +cuda-vector-add diff --git a/test/images/nvidia-cuda/VERSION b/test/images/nvidia-cuda/VERSION new file mode 100644 index 0000000000..60fe1f267b --- /dev/null +++ b/test/images/nvidia-cuda/VERSION @@ -0,0 +1 @@ +v0.2 diff --git a/test/images/redis/BASEIMAGE b/test/images/redis/BASEIMAGE new file mode 100644 index 0000000000..114844f395 --- /dev/null +++ b/test/images/redis/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/redis/Dockerfile b/test/images/redis/Dockerfile index ecc3ed7c32..0add11c3d4 100644 --- a/test/images/redis/Dockerfile +++ b/test/images/redis/Dockerfile @@ -12,7 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM alpine:3.5 +FROM BASEIMAGE + +CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/ RUN apk add --no-cache redis diff --git a/test/images/redis/Makefile b/test/images/redis/Makefile deleted file mode 100644 index 58ff57da82..0000000000 --- a/test/images/redis/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright 2017 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -TAG ?= e2e -PREFIX ?= gcr.io/k8s-testimages - -all: push - -image: - docker build --pull -t $(PREFIX)/redis:$(TAG) . - -push: image - gcloud docker -- push $(PREFIX)/redis:$(TAG) - -clean: diff --git a/test/images/redis/NAME b/test/images/redis/NAME new file mode 100644 index 0000000000..7800f0fad3 --- /dev/null +++ b/test/images/redis/NAME @@ -0,0 +1 @@ +redis diff --git a/test/images/redis/VERSION b/test/images/redis/VERSION new file mode 100644 index 0000000000..49d59571fb --- /dev/null +++ b/test/images/redis/VERSION @@ -0,0 +1 @@ +0.1