Skip to content

Commit

Permalink
Add git commit id as docker image tag
Browse files Browse the repository at this point in the history
  • Loading branch information
vish-cs committed Jan 21, 2025
1 parent 6430e49 commit 53b4c75
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions import-automation/executor/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -33,4 +33,4 @@ steps:
- '-c'
- |
docker tag ${_DOCKER_IMAGE}:latest ${_DOCKER_IMAGE}:stable \
&& docker push ${_DOCKER_IMAGE}:stable
&& docker push ${_DOCKER_IMAGE}:stable

0 comments on commit 53b4c75

Please sign in to comment.