This repository has been archived by the owner on Mar 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
cloudbuild.yaml
38 lines (38 loc) · 1.67 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
31
32
33
34
35
36
37
38
steps:
- name: 'gcr.io/cloud-builders/docker'
args: [
'pull',
'gcr.io/$PROJECT_ID/seldon-core-python-example/build:latest',
]
- name: 'gcr.io/cloud-builders/docker'
args: [
'build',
'--cache-from=gcr.io/$PROJECT_ID/seldon-core-python-example/build:latest',
'--tag=gcr.io/$PROJECT_ID/seldon-core-python-example/build:latest',
'--tag=gcr.io/$PROJECT_ID/seldon-core-python-example/build:$COMMIT_SHA',
'./build',
]
- name: 'gcr.io/cloud-builders/docker'
args: [
'pull',
'gcr.io/$PROJECT_ID/seldon-core-python-example/model:latest',
]
- name: 'gcr.io/cloud-builders/docker'
args: [
'build',
## `--cache-from` only works in the last stage of the build, see https://github.com/moby/moby/issues/34715
'--cache-from=gcr.io/$PROJECT_ID/seldon-core-python-example/model:latest',
'--tag=gcr.io/$PROJECT_ID/seldon-core-python-example/model:latest',
'--tag=gcr.io/$PROJECT_ID/seldon-core-python-example/model:$COMMIT_SHA',
'--build-arg=BUILD_IMAGE=gcr.io/$PROJECT_ID/seldon-core-python-example/build:$COMMIT_SHA',
'--build-arg=IMAGE_REPO=gcr.io/$PROJECT_ID/seldon-core-python-example/model',
'--build-arg=IMAGE_VERSION=$COMMIT_SHA',
'--build-arg=MODEL_NAME=IrisClassifier',
'./model',
]
images:
- 'gcr.io/$PROJECT_ID/seldon-core-python-example/build:latest'
- 'gcr.io/$PROJECT_ID/seldon-core-python-example/build:$COMMIT_SHA'
- 'gcr.io/$PROJECT_ID/seldon-core-python-example/model:latest'
- 'gcr.io/$PROJECT_ID/seldon-core-python-example/model:$COMMIT_SHA'
timeout: '40m'