From 74ba25737067ef55adbb96504e7fb9c9182ab70e Mon Sep 17 00:00:00 2001 From: Jonathan Tong Date: Tue, 28 Feb 2023 15:29:31 -0500 Subject: [PATCH] Add cloudbuild.yaml for prow job --- Makefile | 4 ---- cloudbuild.yaml | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 cloudbuild.yaml diff --git a/Makefile b/Makefile index 6954421a..34183b0f 100644 --- a/Makefile +++ b/Makefile @@ -485,10 +485,6 @@ release-staging-nightly: ## Tag and push container images to the staging bucket. .PHONY: release-alias-tag release-alias-tag: ## Add the release alias tag to the last build tag gcloud container images add-tag $(CONTROLLER_IMG):$(TAG) $(CONTROLLER_IMG):$(RELEASE_ALIAS_TAG) - gcloud container images add-tag $(KUBEADM_BOOTSTRAP_CONTROLLER_IMG):$(TAG) $(KUBEADM_BOOTSTRAP_CONTROLLER_IMG):$(RELEASE_ALIAS_TAG) - gcloud container images add-tag $(KUBEADM_CONTROL_PLANE_CONTROLLER_IMG):$(TAG) $(KUBEADM_CONTROL_PLANE_CONTROLLER_IMG):$(RELEASE_ALIAS_TAG) - gcloud container images add-tag $(CLUSTERCTL_IMG):$(TAG) $(CLUSTERCTL_IMG):$(RELEASE_ALIAS_TAG) - gcloud container images add-tag $(CAPD_CONTROLLER_IMG):$(TAG) $(CAPD_CONTROLLER_IMG):$(RELEASE_ALIAS_TAG) .PHONY: release-notes release-notes: $(RELEASE_NOTES_DIR) $(RELEASE_NOTES) diff --git a/cloudbuild.yaml b/cloudbuild.yaml new file mode 100644 index 00000000..81f3f4fa --- /dev/null +++ b/cloudbuild.yaml @@ -0,0 +1,21 @@ +# See https://cloud.google.com/cloud-build/docs/build-config +# See https://console.cloud.google.com/gcr/images/k8s-staging-test-infra/global/gcb-docker-gcloud +timeout: 2700s +options: + substitution_option: ALLOW_LOOSE + machineType: 'N1_HIGHCPU_8' +steps: + - name: 'gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20221007-ad65926f6b' + entrypoint: make + env: + - DOCKER_CLI_EXPERIMENTAL=enabled + - TAG=$_GIT_TAG + - PULL_BASE_REF=$_PULL_BASE_REF + - DOCKER_BUILDKIT=1 + args: + - release-staging +substitutions: + # _GIT_TAG will be filled with a git-based tag for the image, of the form vYYYYMMDD-hash, and + # can be used as a substitution + _GIT_TAG: '12345' + _PULL_BASE_REF: 'dev'