-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
25 lines (21 loc) · 894 Bytes
/
cloudbuild.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
steps:
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t',
'gcr.io/${PROJECT_ID}/${_SERVICE_NAME}', '.']
- name: 'gcr.io/cloud-builders/docker'
args: ['push',
'gcr.io/${PROJECT_ID}/${_SERVICE_NAME}' ]
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
entrypoint: 'gcloud'
args: ['run', 'deploy', '${_SERVICE_NAME}',
'--platform', 'managed', '--region', '${_REGION}',
'--allow-unauthenticated',
'--image', 'gcr.io/${PROJECT_ID}/${_SERVICE_NAME}']
# Force the new revision to serve 100% of traffic.
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
entrypoint: 'gcloud'
args: ['run', 'services', 'update-traffic', '${_SERVICE_NAME}', '--to-latest',
'--platform', 'managed', '--region', '${_REGION}']
substitutions:
_SERVICE_NAME: myservice
_REGION: us-central1