From be889f892a36082a9b39f32fd3716101d1abcbe9 Mon Sep 17 00:00:00 2001 From: m1093782566 Date: Sat, 10 Sep 2016 07:30:48 -0400 Subject: [PATCH] address comments --- test/images/serve_hostname/Makefile | 7 +++---- test/images/serve_hostname/README.md | 6 ++++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/test/images/serve_hostname/Makefile b/test/images/serve_hostname/Makefile index a4d215a0dc..a492b1880c 100644 --- a/test/images/serve_hostname/Makefile +++ b/test/images/serve_hostname/Makefile @@ -31,8 +31,7 @@ ALL_ARCH = amd64 arm arm64 ppc64le GOARM=6 TEMP_DIR := $(shell mktemp -d) -KUBE_CROSS_IMAGE = gcr.io/google_containers/kube-cross -KUBE_CROSS_VERSION = $(shell cat ../../../build/build-image/cross/VERSION) +GOLANG_VERSION = 1.6.3 BIN = serve_hostname SRCS = serve_hostname.go @@ -74,7 +73,7 @@ bin/$(BIN)-$(ARCH): $(SRCS) cp ./* $(TEMP_DIR) docker run -it -v $(TEMP_DIR):/build \ - $(KUBE_CROSS_IMAGE):$(KUBE_CROSS_VERSION) \ + golang:$(GOLANG_VERSION) \ /bin/bash -c "\ cd /build && \ CGO_ENABLED=0 GOARM=$(GOARM) GOARCH=$(ARCH) go build -a -installsuffix cgo --ldflags '-w' -o $(BIN) ./$(SRCS)" @@ -86,7 +85,7 @@ container: .container-$(ARCH) docker build -t $(IMAGE):$(TAG) $(TEMP_DIR) if [ -n "$(TEST_REGISTRY)" ]; then \ - docker tag -f $(IMAGE):$(TAG) $(TEST_IMAGE):$(TAG) ;\ + docker tag $(IMAGE):$(TAG) $(TEST_IMAGE):$(TAG) ;\ fi push: .push-$(ARCH) diff --git a/test/images/serve_hostname/README.md b/test/images/serve_hostname/README.md index 973db6c69e..3efc0e8874 100644 --- a/test/images/serve_hostname/README.md +++ b/test/images/serve_hostname/README.md @@ -10,8 +10,10 @@ If you are releasing a new version, please bump the `TAG` value in the `Makefile ## How to release: ``` +# Build cross-platform binaries +$ make all-push + # Build for linux/amd64 (default) -$ make push $ make push ARCH=amd64 # ---> gcr.io/google_containers/serve_hostname-amd64:TAG @@ -25,7 +27,7 @@ $ make push ARCH=ppc64le # ---> gcr.io/google_containers/serve_hostname-ppc64le:TAG ``` -Of course, if you don't want to push the images, just run `make container` +Of course, if you don't want to push the images, run `make all-container` or `make container ARCH={target_arch}` instead. [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/contrib/for-demos/serve_hostname/README.md?pixel)]()