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 22, 2025
1 parent f9811d5 commit 86a5efc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 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}', '${_DOCKER_IMAGE}:latest', '.']
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}', '--all-tags']

# Install dependencies
- name: python:3.11.11
Expand All @@ -32,5 +32,5 @@ steps:
args:
- '-c'
- |
docker tag ${_DOCKER_IMAGE}:latest ${_DOCKER_IMAGE}:stable \
&& docker push ${_DOCKER_IMAGE}:stable
docker tag ${_DOCKER_IMAGE}:${COMMIT_SHA} ${_DOCKER_IMAGE}:stable \
&& docker push ${_DOCKER_IMAGE}:stable

0 comments on commit 86a5efc

Please sign in to comment.