-
Notifications
You must be signed in to change notification settings - Fork 2
/
cloudbuild.yaml
18 lines (18 loc) · 964 Bytes
/
cloudbuild.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
steps:
# Docker Pull (see https://cloud.google.com/build/docs/optimize-builds/speeding-up-builds)
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'bash'
args: ['-c', 'docker pull us-central1-docker.pkg.dev/$PROJECT_ID/cloud-run-source-deploy/nalgene:latest || exit 0']
# Docker Build
- name: 'gcr.io/cloud-builders/docker'
args: [
'build',
'-t', 'us-central1-docker.pkg.dev/$PROJECT_ID/cloud-run-source-deploy/nalgene:latest',
'--cache-from', 'us-central1-docker.pkg.dev/$PROJECT_ID/cloud-run-source-deploy/nalgene:latest',
'.'
]
# Docker Push (see https://cloud.google.com/build/docs/configuring-builds/create-basic-configuration)
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'us-central1-docker.pkg.dev/${PROJECT_ID}/cloud-run-source-deploy/nalgene']
# This may be the same as docker push above
# images: ['us-central1-docker.pkg.dev/$PROJECT_ID/cloud-run-source-deploy/nalgene:latest']