diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 0994e46..f81d71e 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -15,22 +15,29 @@ # 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