Skip to content

Commit

Permalink
Merge pull request kubernetes#257 from dims/build-and-push-manifests-…
Browse files Browse the repository at this point in the history
…for-container-images

Build and push manifests for container images
  • Loading branch information
k8s-ci-robot authored Aug 2, 2018
2 parents c4ca96d + dc35258 commit fed0c13
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
11 changes: 5 additions & 6 deletions guestbook/php-redis/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

TAG = v5
TAG = v6
REGISTRY = gcr.io/google-samples
ARCH ?= $(shell go env GOARCH)
ALL_ARCH = amd64 arm arm64 ppc64le
Expand Down Expand Up @@ -49,7 +49,9 @@ sub-push-%:
all-container: $(addprefix sub-container-,$(ALL_ARCH))

all-push: $(addprefix sub-push-,$(ALL_ARCH))

docker manifest create --amend $(IMAGE):$(TAG) $(shell echo $(ALL_ARCH) | sed -e "s~[^ ]*~$(IMAGE)\-&:$(TAG)~g")
@for arch in $(ALL_ARCH); do echo docker manifest annotate --arch $${arch} ${IMAGE}:${TAG} ${IMAGE}-$${arch}:${TAG}; done
docker manifest push ${IMAGE}:${TAG}

container: .container-$(ARCH)
.container-$(ARCH):
Expand All @@ -70,10 +72,7 @@ endif

push: .push-$(ARCH)
.push-$(ARCH): .container-$(ARCH)
gcloud docker -- push $(MULTI_ARCH_IMG):$(TAG)
ifeq ($(ARCH), amd64)
gcloud docker -- push $(IMAGE):$(TAG)
endif
docker push $(IMAGE):$(TAG)

clean: $(addprefix sub-clean-,$(ALL_ARCH))
docker rmi -f $(IMAGE):$(TAG) || true
Expand Down
10 changes: 5 additions & 5 deletions guestbook/redis-slave/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

TAG = v2
TAG = v3
REGISTRY = gcr.io/google-samples
ARCH ?= $(shell go env GOARCH)
ALL_ARCH = amd64 arm arm64 ppc64le
Expand Down Expand Up @@ -47,6 +47,9 @@ sub-push-%:
all-container: $(addprefix sub-container-,$(ALL_ARCH))

all-push: $(addprefix sub-push-,$(ALL_ARCH))
docker manifest create --amend $(IMAGE):$(TAG) $(shell echo $(ALL_ARCH) | sed -e "s~[^ ]*~$(IMAGE)\-&:$(TAG)~g")
@for arch in $(ALL_ARCH); do echo docker manifest annotate --arch $${arch} ${IMAGE}:${TAG} ${IMAGE}-$${arch}:${TAG}; done
docker manifest push ${IMAGE}:${TAG}

container: .container-$(ARCH)
.container-$(ARCH):
Expand All @@ -65,10 +68,7 @@ endif

push: .push-$(ARCH)
.push-$(ARCH): .container-$(ARCH)
gcloud docker -- push $(MULTI_ARCH_IMG):$(TAG)
ifeq ($(ARCH), amd64)
gcloud docker -- push $(IMAGE):$(TAG)
endif
docker push $(IMAGE):$(TAG)

clean: $(addprefix sub-clean-,$(ALL_ARCH))
docker rmi -f $(IMAGE):$(TAG) || true
Expand Down

0 comments on commit fed0c13

Please sign in to comment.