From 53b4c75dbaae5c44c157fcdd4096bf1a0d427b68 Mon Sep 17 00:00:00 2001 From: Vishal Gupta Date: Tue, 21 Jan 2025 05:37:49 +0000 Subject: [PATCH] Add git commit id as docker image tag --- import-automation/executor/cloudbuild.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/import-automation/executor/cloudbuild.yaml b/import-automation/executor/cloudbuild.yaml index 45b2a9f5af..69204718cc 100644 --- a/import-automation/executor/cloudbuild.yaml +++ b/import-automation/executor/cloudbuild.yaml @@ -7,12 +7,12 @@ steps: # Docker Build - name: 'gcr.io/cloud-builders/docker' - args: ['build', '-t', '${_DOCKER_IMAGE}:latest', '.'] + args: ['build', '-t', '${_DOCKER_IMAGE}:{COMMIT_SHA}', '.'] dir: 'import-automation/executor' # Docker push to Google Artifact Registry - name: 'gcr.io/cloud-builders/docker' - args: ['push', '${_DOCKER_IMAGE}:latest'] + args: ['push', '${_DOCKER_IMAGE}:{COMMIT_SHA}'] # Install dependencies - name: python:3.11.11 @@ -33,4 +33,4 @@ steps: - '-c' - | docker tag ${_DOCKER_IMAGE}:latest ${_DOCKER_IMAGE}:stable \ - && docker push ${_DOCKER_IMAGE}:stable \ No newline at end of file + && docker push ${_DOCKER_IMAGE}:stable