-
Notifications
You must be signed in to change notification settings - Fork 8
/
cloudbuild.yaml
30 lines (30 loc) · 1.55 KB
/
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
26
27
28
29
30
steps:
- name: 'gcr.io/cloud-builders/docker'
args: [ 'build', '--target', 'flask', '-t', 'gcr.io/$PROJECT_ID/metrics-flask:$REVISION_ID', '.' ]
- name: 'gcr.io/cloud-builders/docker'
args: [ 'push', 'gcr.io/$PROJECT_ID/metrics-flask:$REVISION_ID' ]
- name: 'gcr.io/cloud-builders/docker'
args: [ 'tag', 'gcr.io/$PROJECT_ID/metrics-flask:$REVISION_ID', 'gcr.io/$PROJECT_ID/metrics-flask:latest' ]
- name: 'gcr.io/cloud-builders/docker'
args: [ 'push', 'gcr.io/$PROJECT_ID/metrics-flask:latest' ]
- name: 'gcr.io/cloud-builders/docker'
args: [ 'build', '--target', 'web', '-t', 'gcr.io/$PROJECT_ID/metrics-web:$REVISION_ID', '.' ]
- name: 'gcr.io/cloud-builders/docker'
args: [ 'push', 'gcr.io/$PROJECT_ID/metrics-web:$REVISION_ID' ]
- name: 'gcr.io/cloud-builders/docker'
args: [ 'tag', 'gcr.io/$PROJECT_ID/metrics-web:$REVISION_ID', 'gcr.io/$PROJECT_ID/metrics-web:latest' ]
- name: 'gcr.io/cloud-builders/docker'
args: [ 'push', 'gcr.io/$PROJECT_ID/metrics-web:latest' ]
- name: 'gcr.io/cloud-builders/kubectl'
args: [ 'set', 'image', 'deployment/web', 'web=gcr.io/$PROJECT_ID/metrics-web:$REVISION_ID' ]
env:
- 'CLOUDSDK_COMPUTE_ZONE=${_COMPUTE_ZONE}'
- 'CLOUDSDK_CONTAINER_CLUSTER=${_CONTAINER_CLUSTER}'
- name: 'gcr.io/cloud-builders/kubectl'
args: [ 'set', 'image', 'deployment/flask', 'flask=gcr.io/$PROJECT_ID/metrics-flask:$REVISION_ID' ]
env:
- 'CLOUDSDK_COMPUTE_ZONE=${_COMPUTE_ZONE}'
- 'CLOUDSDK_CONTAINER_CLUSTER=${_CONTAINER_CLUSTER}'
images:
- 'gcr.io/$PROJECT_ID/metrics-flask:$REVISION_ID'
- 'gcr.io/$PROJECT_ID/metrics-web:$REVISION_ID'