Skip to content

Commit 97b4179

Browse files
committed
add multi arch build to postsubmit in GCB
Signed-off-by: Patrik Cyvoct <[email protected]>
1 parent ffd4c1d commit 97b4179

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
clean vet fmt version \
1919
Dockerfile build-binaries docker-builder build-in-docker \
2020
build-all build-all-container \
21-
build-tar-all push-all push-all-container push-manifest push-tar-all qemu-register
21+
build-tar-all push-all push-all-container push-manifest push-tar-all qemu-register \
22+
release-staging
2223

2324
TEMP_DIR := $(shell mktemp -d)
2425

@@ -40,6 +41,9 @@ export DOCKER_CLI_EXPERIMENTAL := enabled
4041
# REGISTRY is the container registry to push into.
4142
REGISTRY?=staging-k8s.gcr.io
4243

44+
# STAGING_REGISTRY is the new registry for staging
45+
STAGING_REGISTRY?=gcr.io/k8s-staging-npd
46+
4347
# UPLOAD_PATH is the cloud storage path to upload release tar.
4448
UPLOAD_PATH?=gs://kubernetes-release
4549
# Trim the trailing '/' in the path
@@ -123,6 +127,7 @@ version:
123127
@echo $(VERSION)
124128

125129
./bin/log-counter: $(PKG_SOURCES)
130+
ifeq ($(ENABLE_JOURNALD), 1)
126131
CGO_ENABLED=$(CGO_ENABLED) GOOS=linux GOARCH=$(ARCH) GO111MODULE=on go build \
127132
-mod vendor \
128133
-o bin/log-counter-$(ARCH) \
@@ -246,6 +251,9 @@ push-all: push-all-container push-manifest push-tar-all
246251

247252
push: push-container push-tar
248253

254+
release-staging:
255+
REGISTRY=$(STAGING_REGISTRY) $(MAKE) push-all
256+
249257
clean:
250258
rm -f bin/log-counter*
251259
rm -f bin/node-problem-detector*

cloudbuild.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
timeout: 1200s
2+
options:
3+
substitution_option: ALLOW_LOOSE
4+
steps:
5+
- name: 'gcr.io/k8s-testimages/gcb-docker-gcloud:v20190906-745fed4'
6+
entrypoint: make
7+
env:
8+
- TAG=$_GIT_TAG
9+
- BASE_REF=$_PULL_BASE_REF
10+
- DOCKER_CLI_EXPERIMENTAL=enabled
11+
args:
12+
- release-staging
13+
substitutions:
14+
# _GIT_TAG will be filled with a git-based tag for the image, of the form vYYYYMMDD-hash, and
15+
# can be used as a substitution
16+
_GIT_TAG: '12345'
17+
_PULL_BASE_REF: 'dev'

0 commit comments

Comments
 (0)