Skip to content

Commit

Permalink
Modified cloudbuild file
Browse files Browse the repository at this point in the history
  • Loading branch information
shivamgutgutia committed Nov 19, 2023
1 parent 1bdf452 commit d3d15fa
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
steps:
- name: 'Delete previous containers'
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'bash'
args:
- '-c'
- 'docker ps -a | grep "gcr.io/shivam-contacts-generator/github.com/shivamgutgutia/contactsgeneratorbackend" | awk "{print $1}" | xargs -r docker rm -f'

- name: 'Delete previous images'
- name: ''gcr.io/cloud-builders/docker'
entrypoint: 'bash'
args:
- '-c'
- 'docker images -a | grep "gcr.io/shivam-contacts-generator/github.com/shivamgutgutia/contactsgeneratorbackend" | awk "{print $3}" | xargs -r docker rmi -f'

- name: 'Build new image'
- name: 'gcr.io/cloud-builders/docker'
args:
- 'build'
- '-t'
Expand All @@ -20,18 +20,18 @@ steps:
- 'Dockerfile'
- '.'

- name: 'Push new image to Container Registry'
- name: 'gcr.io/cloud-builders/docker'
args:
- 'push'
- 'gcr.io/shivam-contacts-generator/github.com/shivamgutgutia/contactsgeneratorbackend:$COMMIT_SHA'

- name: 'Fetch commit SHA'
- name: 'gcr.io/cloud-builders/gcloud'
entrypoint: 'bash'
args:
- '-c'
- 'COMMIT_SHA=$(echo $COMMIT_SHA)'

- name: 'Deploy new revision to Cloud Run'
- name: 'gcr.io/cloud-builders/gcloud'
entrypoint: 'bash'
args:
- '-c'
Expand Down

0 comments on commit d3d15fa

Please sign in to comment.