From 06e2da3f98806b22f9e042b84378257bb467ae0a Mon Sep 17 00:00:00 2001 From: Shruti Mantri Date: Thu, 30 Apr 2026 13:26:19 +0530 Subject: [PATCH 1/2] feat: support dynamic image tags --- cloudbuild.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 0994e46c..8b0a1a37 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -15,22 +15,25 @@ # Default cloudbuild.yaml for Cloud Shell custom images. # This file is used by the Cloud Build trigger that builds this image. +substitutions: + _IMAGE_TAG: '${COMMIT_SHA}' steps: - name: "gcr.io/cloud-builders/docker" args: [ "build", "-t", - "gcr.io/$PROJECT_ID/button", + "gcr.io/$PROJECT_ID/button:latest", "-t", - "gcr.io/$PROJECT_ID/button:public-image-${COMMIT_SHA}", + "gcr.io/$PROJECT_ID/button:public-image-${_IMAGE_TAG}", ".", ] - name: "gcr.io/cloudshell-images/custom-image-validation" args: ["image_test.py", "--image", "gcr.io/$PROJECT_ID/button"] images: - - "gcr.io/$PROJECT_ID/button" - - "gcr.io/$PROJECT_ID/button:public-image-${COMMIT_SHA}" + - "gcr.io/$PROJECT_ID/button:latest" + - "gcr.io/$PROJECT_ID/button:public-image-${_IMAGE_TAG}" timeout: "3600s" options: machineType: "N1_HIGHCPU_8" + dynamicSubstitutions: true From 69307e3d8819441063204f78815390f4182177d8 Mon Sep 17 00:00:00 2001 From: Shruti Mantri Date: Thu, 30 Apr 2026 13:28:51 +0530 Subject: [PATCH 2/2] dummy commit --- cloudbuild.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 8b0a1a37..f81d71e4 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -17,6 +17,7 @@ substitutions: _IMAGE_TAG: '${COMMIT_SHA}' + steps: - name: "gcr.io/cloud-builders/docker" args: @@ -30,10 +31,13 @@ steps: ] - name: "gcr.io/cloudshell-images/custom-image-validation" args: ["image_test.py", "--image", "gcr.io/$PROJECT_ID/button"] + images: - "gcr.io/$PROJECT_ID/button:latest" - "gcr.io/$PROJECT_ID/button:public-image-${_IMAGE_TAG}" + timeout: "3600s" + options: machineType: "N1_HIGHCPU_8" dynamicSubstitutions: true