Skip to content

Commit 6e35a13

Browse files
authored
Merge pull request kubernetes#88562 from justaugustus/kube-cross-k8s-infra
build: Enable kube-cross image-building on K8s Infra
2 parents 5ceddce + e64169d commit 6e35a13

File tree

8 files changed

+53
-10
lines changed

8 files changed

+53
-10
lines changed

OWNERS_ALIASES

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,18 @@ aliases:
128128
- justaugustus # SIG Chair
129129
- saschagrunert # Branch Manager
130130
- tpepper # SIG Chair / Patch Release Team
131+
build-image-approvers:
132+
- BenTheElder
133+
- cblecker
134+
- dims
135+
- justaugustus
136+
- listx
137+
build-image-reviewers:
138+
- BenTheElder
139+
- cblecker
140+
- dims
141+
- justaugustus
142+
- listx
131143

132144
sig-storage-reviewers:
133145
- saad-ali

build/OWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ reviewers:
44
- bentheelder
55
- cblecker
66
- fejta
7+
- justaugustus
78
- lavalamp
89
- spiffxp
910
approvers:

build/build-image/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
# This file creates a standard build environment for building Kubernetes
16-
FROM k8s.gcr.io/kube-cross:KUBE_BUILD_IMAGE_CROSS_TAG
16+
FROM us.gcr.io/k8s-artifacts-prod/build-image/kube-cross:KUBE_BUILD_IMAGE_CROSS_TAG
1717

1818
# Mark this as a kube-build container
1919
RUN touch /kube-build-image

build/build-image/OWNERS

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# See the OWNERS docs at https://go.k8s.io/owners
2+
3+
approvers:
4+
- build-image-approvers
5+
reviewers:
6+
- build-image-reviewers
7+
8+
labels:
9+
- sig/release
10+
- area/release-eng

build/build-image/cross/Makefile

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,22 @@
1414

1515
.PHONY: build push
1616

17-
REGISTRY?=staging-k8s.gcr.io
18-
IMAGE=$(REGISTRY)/kube-cross
19-
TAG=$(shell cat VERSION)
17+
STAGING_REGISTRY?=gcr.io/k8s-staging-build-image
18+
PROD_REGISTRY?=us.gcr.io/k8s-artifacts-prod/build-image
19+
IMAGE=kube-cross
2020

21+
TAG?=kubernetes-$(shell git describe --tags --match='v*' --abbrev=14)
22+
KUBE_CROSS_VERSION=$(shell cat VERSION)
2123

22-
all: push
24+
all: build push
2325

2426
build:
25-
docker build --pull -t $(IMAGE):$(TAG) .
27+
docker build \
28+
-t $(STAGING_REGISTRY)/$(IMAGE):$(TAG) \
29+
-t $(STAGING_REGISTRY)/$(IMAGE):$(KUBE_CROSS_VERSION) \
30+
-t $(PROD_REGISTRY)/$(IMAGE):$(KUBE_CROSS_VERSION) \
31+
.
2632

27-
push: build
28-
docker push $(IMAGE):$(TAG)
33+
push:
34+
docker push $(STAGING_REGISTRY)/$(IMAGE):$(TAG)
35+
docker push $(STAGING_REGISTRY)/$(IMAGE):$(KUBE_CROSS_VERSION)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# See https://cloud.google.com/cloud-build/docs/build-config
2+
timeout: 1200s
3+
options:
4+
substitution_option: ALLOW_LOOSE
5+
steps:
6+
- name: 'gcr.io/k8s-testimages/gcb-docker-gcloud:v20191019-6567e5c'
7+
entrypoint: make
8+
env:
9+
- DOCKER_CLI_EXPERIMENTAL=enabled
10+
args:
11+
- all
12+
images:
13+
- 'gcr.io/$PROJECT_ID/kube-cross:kubernetes-${_GIT_TAG}'

build/pause/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ ARCH ?= amd64
2727
ALL_ARCH = amd64 arm arm64 ppc64le s390x
2828

2929
CFLAGS = -Os -Wall -Werror -static -DVERSION=v$(TAG)-$(REV)
30-
KUBE_CROSS_IMAGE ?= k8s.gcr.io/kube-cross
30+
KUBE_CROSS_IMAGE ?= us.gcr.io/k8s-artifacts-prod/build-image/kube-cross
3131
KUBE_CROSS_VERSION ?= $(shell cat ../build-image/cross/VERSION)
3232

3333
BIN = pause

test/images/sample-apiserver/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM k8s.gcr.io/kube-cross:v1.13.6-1 as build_k8s_1_17_sample_apiserver
15+
FROM us.gcr.io/k8s-artifacts-prod/build-image/kube-cross:v1.13.6-1 as build_k8s_1_17_sample_apiserver
1616

1717
ENV GOPATH /go
1818
RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin

0 commit comments

Comments
 (0)