diff --git a/OWNERS_ALIASES b/OWNERS_ALIASES index 65c1b5902bd..0cc6b8066e9 100644 --- a/OWNERS_ALIASES +++ b/OWNERS_ALIASES @@ -128,6 +128,18 @@ aliases: - justaugustus # SIG Chair - saschagrunert # Branch Manager - tpepper # SIG Chair / Patch Release Team + build-image-approvers: + - BenTheElder + - cblecker + - dims + - justaugustus + - listx + build-image-reviewers: + - BenTheElder + - cblecker + - dims + - justaugustus + - listx sig-storage-reviewers: - saad-ali diff --git a/build/OWNERS b/build/OWNERS index 8bcc7cfd72c..fd640aac895 100644 --- a/build/OWNERS +++ b/build/OWNERS @@ -4,6 +4,7 @@ reviewers: - bentheelder - cblecker - fejta + - justaugustus - lavalamp - spiffxp approvers: diff --git a/build/build-image/Dockerfile b/build/build-image/Dockerfile index f9d0adaf034..0ebf515c4ed 100644 --- a/build/build-image/Dockerfile +++ b/build/build-image/Dockerfile @@ -13,7 +13,7 @@ # limitations under the License. # This file creates a standard build environment for building Kubernetes -FROM k8s.gcr.io/kube-cross:KUBE_BUILD_IMAGE_CROSS_TAG +FROM us.gcr.io/k8s-artifacts-prod/build-image/kube-cross:KUBE_BUILD_IMAGE_CROSS_TAG # Mark this as a kube-build container RUN touch /kube-build-image diff --git a/build/build-image/OWNERS b/build/build-image/OWNERS new file mode 100644 index 00000000000..8316d62099a --- /dev/null +++ b/build/build-image/OWNERS @@ -0,0 +1,10 @@ +# See the OWNERS docs at https://go.k8s.io/owners + +approvers: + - build-image-approvers +reviewers: + - build-image-reviewers + +labels: + - sig/release + - area/release-eng diff --git a/build/build-image/cross/Makefile b/build/build-image/cross/Makefile index 1ca326ff70c..defb0f5e671 100644 --- a/build/build-image/cross/Makefile +++ b/build/build-image/cross/Makefile @@ -14,15 +14,22 @@ .PHONY: build push -REGISTRY?=staging-k8s.gcr.io -IMAGE=$(REGISTRY)/kube-cross -TAG=$(shell cat VERSION) +STAGING_REGISTRY?=gcr.io/k8s-staging-build-image +PROD_REGISTRY?=us.gcr.io/k8s-artifacts-prod/build-image +IMAGE=kube-cross +TAG?=kubernetes-$(shell git describe --tags --match='v*' --abbrev=14) +KUBE_CROSS_VERSION=$(shell cat VERSION) -all: push +all: build push build: - docker build --pull -t $(IMAGE):$(TAG) . + docker build \ + -t $(STAGING_REGISTRY)/$(IMAGE):$(TAG) \ + -t $(STAGING_REGISTRY)/$(IMAGE):$(KUBE_CROSS_VERSION) \ + -t $(PROD_REGISTRY)/$(IMAGE):$(KUBE_CROSS_VERSION) \ + . -push: build - docker push $(IMAGE):$(TAG) +push: + docker push $(STAGING_REGISTRY)/$(IMAGE):$(TAG) + docker push $(STAGING_REGISTRY)/$(IMAGE):$(KUBE_CROSS_VERSION) diff --git a/build/build-image/cross/cloudbuild.yaml b/build/build-image/cross/cloudbuild.yaml new file mode 100644 index 00000000000..9b698c43349 --- /dev/null +++ b/build/build-image/cross/cloudbuild.yaml @@ -0,0 +1,13 @@ +# See https://cloud.google.com/cloud-build/docs/build-config +timeout: 1200s +options: + substitution_option: ALLOW_LOOSE +steps: + - name: 'gcr.io/k8s-testimages/gcb-docker-gcloud:v20191019-6567e5c' + entrypoint: make + env: + - DOCKER_CLI_EXPERIMENTAL=enabled + args: + - all +images: + - 'gcr.io/$PROJECT_ID/kube-cross:kubernetes-${_GIT_TAG}' diff --git a/build/pause/Makefile b/build/pause/Makefile index cc757d89f83..d56332a550f 100644 --- a/build/pause/Makefile +++ b/build/pause/Makefile @@ -27,7 +27,7 @@ ARCH ?= amd64 ALL_ARCH = amd64 arm arm64 ppc64le s390x CFLAGS = -Os -Wall -Werror -static -DVERSION=v$(TAG)-$(REV) -KUBE_CROSS_IMAGE ?= k8s.gcr.io/kube-cross +KUBE_CROSS_IMAGE ?= us.gcr.io/k8s-artifacts-prod/build-image/kube-cross KUBE_CROSS_VERSION ?= $(shell cat ../build-image/cross/VERSION) BIN = pause diff --git a/test/images/sample-apiserver/Dockerfile b/test/images/sample-apiserver/Dockerfile index fcdadf58d51..c63459a4371 100644 --- a/test/images/sample-apiserver/Dockerfile +++ b/test/images/sample-apiserver/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM k8s.gcr.io/kube-cross:v1.13.6-1 as build_k8s_1_17_sample_apiserver +FROM us.gcr.io/k8s-artifacts-prod/build-image/kube-cross:v1.13.6-1 as build_k8s_1_17_sample_apiserver ENV GOPATH /go RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin