From a7b9ba784be2e47ff84c43fb01af93bf39a151fb Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Tue, 28 Apr 2020 10:57:10 -0400 Subject: [PATCH] Add cloudbuild.yaml for debian-base/debian-iptables and pause Tested this locally using: ``` gcloud builds submit --config build/cloudbuild.yaml . ``` Signed-off-by: Davanum Srinivas --- build/cloudbuild.yaml | 41 ++++++++++++++++++++++++++++++++++ build/debian-base/Makefile | 2 +- build/debian-iptables/Makefile | 3 ++- build/pause/Makefile | 2 +- 4 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 build/cloudbuild.yaml diff --git a/build/cloudbuild.yaml b/build/cloudbuild.yaml new file mode 100644 index 00000000000..af9f0228423 --- /dev/null +++ b/build/cloudbuild.yaml @@ -0,0 +1,41 @@ +# See https://cloud.google.com/cloud-build/docs/build-config +timeout: 1200s +options: + substitution_option: ALLOW_LOOSE + machineType: 'N1_HIGHCPU_8' +steps: + - name: 'gcr.io/k8s-testimages/gcb-docker-gcloud:v20200422-b25d964' + entrypoint: make + dir: ./build/debian-base + env: + - DOCKER_CLI_EXPERIMENTAL=enabled + - REGISTRY=gcr.io/$PROJECT_ID + - IMAGE=gcr.io/$PROJECT_ID/debian-base + - BUILD_IMAGE=debian-build + - HOME=/root + args: + - all-push + - name: 'gcr.io/k8s-testimages/gcb-docker-gcloud:v20200422-b25d964' + entrypoint: make + dir: ./build/debian-iptables + env: + - DOCKER_CLI_EXPERIMENTAL=enabled + - REGISTRY=gcr.io/$PROJECT_ID + - BASE_REGISTRY=gcr.io/$PROJECT_ID + - IMAGE=gcr.io/$PROJECT_ID/debian-iptables + - HOME=/root + args: + - all-push + - name: 'gcr.io/k8s-testimages/gcb-docker-gcloud:v20200422-b25d964' + entrypoint: 'bash' + dir: ./build/pause + env: + - DOCKER_CLI_EXPERIMENTAL=enabled + - REGISTRY=gcr.io/$PROJECT_ID + - IMAGE=gcr.io/$PROJECT_ID/pause + - HOME=/root + args: + - '-c' + - | + gcloud auth configure-docker \ + && make all-push diff --git a/build/debian-base/Makefile b/build/debian-base/Makefile index bce20b2e3fc..8fabd5e1a7d 100755 --- a/build/debian-base/Makefile +++ b/build/debian-base/Makefile @@ -25,7 +25,7 @@ ARCH?=amd64 ALL_ARCH = amd64 arm arm64 ppc64le s390x TEMP_DIR:=$(shell mktemp -d) -QEMUVERSION=v2.9.1 +QEMUVERSION=v4.2.0-6 SUDO=$(if $(filter 0,$(shell id -u)),,sudo) diff --git a/build/debian-iptables/Makefile b/build/debian-iptables/Makefile index db4a7e51b14..17d4986fe79 100644 --- a/build/debian-iptables/Makefile +++ b/build/debian-iptables/Makefile @@ -21,7 +21,8 @@ ARCH?=amd64 ALL_ARCH = amd64 arm arm64 ppc64le s390x TEMP_DIR:=$(shell mktemp -d) -BASEIMAGE?=k8s.gcr.io/debian-base-$(ARCH):v2.0.1 +BASE_REGISTRY?=k8s.gcr.io +BASEIMAGE?=$(BASE_REGISTRY)/debian-base-$(ARCH):v2.0.1 # This option is for running docker manifest command export DOCKER_CLI_EXPERIMENTAL := enabled diff --git a/build/pause/Makefile b/build/pause/Makefile index d56332a550f..1979c49548c 100644 --- a/build/pause/Makefile +++ b/build/pause/Makefile @@ -86,7 +86,7 @@ bin/$(BIN)-$(ARCH): $(SRCS) container: .container-$(ARCH) .container-$(ARCH): bin/$(BIN)-$(ARCH) - DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build --pull --platform linux/$(ARCH) -t $(IMAGE_WITH_ARCH):$(TAG) --build-arg ARCH=$(ARCH) . + DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build --load --pull --platform linux/$(ARCH) -t $(IMAGE_WITH_ARCH):$(TAG) --build-arg ARCH=$(ARCH) . touch $@ push: .push-$(ARCH)