Merge pull request #33556 from wojtek-t/build_etcd_image

Automatic merge from submit-queue

Allow building experimenta etcd images

Ref #20504

Once this PR is in, I would like to build and push: "etcd:3.0.10-experimental" image to:
- start testing it
- to make it possible to build a different "3.0.10" image in the future (we will most probably built in some loging into it.

@lavalamp - FYI
This commit is contained in:
Kubernetes Submit Queue 2016-09-28 03:39:29 -07:00 committed by GitHub
commit 05b7ee2bee

View File

@ -18,6 +18,7 @@
# [TAG=3.0.4] [REGISTRY=gcr.io/google_containers] [ARCH=amd64] [BASEIMAGE=busybox] make (build|push)
TAG?=3.0.4
REGISTRY_TAG?=$(TAG)
ARCH?=amd64
REGISTRY?=gcr.io/google_containers
GOLANG_VERSION?=1.6.3
@ -71,15 +72,15 @@ endif
cd $(TEMP_DIR) && sed -i.bak 's|BASEIMAGE|$(BASEIMAGE)|g' Dockerfile
# And build the image
docker build -t $(REGISTRY)/etcd-$(ARCH):$(TAG) $(TEMP_DIR)
docker build -t $(REGISTRY)/etcd-$(ARCH):$(REGISTRY_TAG) $(TEMP_DIR)
push: build
gcloud docker push $(REGISTRY)/etcd-$(ARCH):$(TAG)
gcloud docker push $(REGISTRY)/etcd-$(ARCH):$(REGISTRY_TAG)
ifeq ($(ARCH),amd64)
# Backward compatibility. TODO: deprecate this image tag
docker tag $(REGISTRY)/etcd-$(ARCH):$(TAG) $(REGISTRY)/etcd:$(TAG)
gcloud docker push $(REGISTRY)/etcd:$(TAG)
docker tag $(REGISTRY)/etcd-$(ARCH):$(REGISTRY_TAG) $(REGISTRY)/etcd:$(REGISTRY_TAG)
gcloud docker push $(REGISTRY)/etcd:$(REGISTRY_TAG)
endif
all: build