Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

Commit

Permalink
Merge pull request #206 from chuckha/makefile
Browse files Browse the repository at this point in the history
🏃 Update Makefile
  • Loading branch information
k8s-ci-robot authored Sep 3, 2019
2 parents be5a881 + 71b4133 commit 1699fe8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
14 changes: 9 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ PULL_POLICY ?= Always

# Define Docker related variables. Releases should modify and double check these vars.
REGISTRY ?= gcr.io/$(shell gcloud config get-value project)
CONTROLLER_IMG ?= $(REGISTRY)/cluster-api-kubeadm-controller
STAGING_REGISTRY := gcr.io/k8s-staging-capi-kubeadm
PROD_REGISTRY := us.gcr.io/k8s-artifacts-prod/capi-kubeadm
IMAGE_NAME ?= cluster-api-kubeadm-controller
CONTROLLER_IMG ?= $(REGISTRY)/$(IMAGE_NAME)
TAG ?= dev
ARCH ?= amd64
ALL_ARCH = amd64 arm arm64 ppc64le s390x
Expand Down Expand Up @@ -149,6 +152,7 @@ docker-push-manifest: ## Push the fat manifest docker image.
## Minimum docker version 18.06.0 is required for creating and pushing manifest images.
docker manifest create --amend $(CONTROLLER_IMG):$(TAG) $(shell echo $(ALL_ARCH) | sed -e "s~[^ ]*~$(CONTROLLER_IMG)\-&:$(TAG)~g")
@for arch in $(ALL_ARCH); do docker manifest annotate --arch $${arch} ${CONTROLLER_IMG}:${TAG} ${CONTROLLER_IMG}-$${arch}:${TAG}; done
docker manifest push --purge ${CONTROLLER_IMG}:${TAG}
MANIFEST_IMG=$(CONTROLLER_IMG) MANIFEST_TAG=$(TAG) $(MAKE) set-manifest-image

.PHONY: set-manifest-image
Expand All @@ -166,16 +170,16 @@ RELEASE_TAG := $(shell git describe --abbrev=0 2>/dev/null)
release: ## Builds and push container images using the latest git tag for the commit.
@if [ -z "${RELEASE_TAG}" ]; then echo "RELEASE_TAG is not set"; exit 1; fi
# Push the release image to the staging bucket first.
REGISTRY=gcr.io/k8s-staging-capi-kubeadm TAG=$(RELEASE_TAG) \
REGISTRY=$(STAGING_REGISTRY) TAG=$(RELEASE_TAG) \
$(MAKE) docker-build-all docker-push-all
# Set the manifest image to the production bucket.
REGISTRY=us.gcr.io/k8s-artifacts-prod/capi-kubeadm TAG=$(RELEASE_TAG) \
set-manifest-image
MANIFEST_IMG=$(PROD_REGISTRY)/$(IMAGE_NAME) MANIFEST_TAG=$(RELEASE_TAG) \
$(MAKE) set-manifest-image
# Generate release artifacts.
mkdir -p out/
kustomize build config/default > out/bootstrap-components.yaml

.PHONY: release-staging-latest
release-staging-latest: ## Builds and push container images to the staging bucket using "latest" tag.
REGISTRY=gcr.io/k8s-staging-capi-kubeadm TAG=latest \
REGISTRY=$(STAGING_REGISTRY) TAG=latest \
$(MAKE) docker-build-all docker-push-all
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ require (
k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible
k8s.io/cluster-bootstrap v0.0.0-20190516232516-d7d78ab2cfe7
k8s.io/klog v0.4.0
sigs.k8s.io/cluster-api v0.0.0-20190830181856-67d897059593
sigs.k8s.io/cluster-api v0.2.0
sigs.k8s.io/controller-runtime v0.2.0
)

replace (
k8s.io/api => k8s.io/api v0.0.0-20190704095032-f4ca3d3bdf1d
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20190704094733-8f6ac2502e51
sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v0.0.0-20190830181856-67d897059593
sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v0.2.0
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ k8s.io/kube-openapi v0.0.0-20180731170545-e3762e86a74c/go.mod h1:BXM9ceUBTj2QnfH
k8s.io/utils v0.0.0-20190506122338-8fab8cb257d5/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
k8s.io/utils v0.0.0-20190809000727-6c36bc71fc4a h1:uy5HAgt4Ha5rEMbhZA+aM1j2cq5LmR6LQ71EYC2sVH4=
k8s.io/utils v0.0.0-20190809000727-6c36bc71fc4a/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
sigs.k8s.io/cluster-api v0.0.0-20190830181856-67d897059593 h1:kR5+NTkokUUyPuTg3T4YI8Ab/MmTjEtlnsEJ1buEkTE=
sigs.k8s.io/cluster-api v0.0.0-20190830181856-67d897059593/go.mod h1:PQFa4RZOESzjF7B8pNOWJSVgUzdAdPbSmuFDz301sgI=
sigs.k8s.io/cluster-api v0.2.0 h1:YjioPI9bdrJ6T2PFUHLfkG/+YdUth73SMIhp3YoONx8=
sigs.k8s.io/cluster-api v0.2.0/go.mod h1:PQFa4RZOESzjF7B8pNOWJSVgUzdAdPbSmuFDz301sgI=
sigs.k8s.io/controller-runtime v0.2.0 h1:5gL30PXOisGZl+Osi4CmLhvMUj77BO3wJeouKF2va50=
sigs.k8s.io/controller-runtime v0.2.0/go.mod h1:ZHqrRDZi3f6BzONcvlUxkqCKgwasGk5FZrnSv9TVZF4=
sigs.k8s.io/testing_frameworks v0.1.1/go.mod h1:VVBKrHmJ6Ekkfz284YKhQePcdycOzNH9qL6ht1zEr/U=
Expand Down

0 comments on commit 1699fe8

Please sign in to comment.