forked from balrog-kun/osm-addr-tools
-
Notifications
You must be signed in to change notification settings - Fork 3
/
cloudbuild.yaml
40 lines (30 loc) · 1.3 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
39
40
steps:
- name: 'gcr.io/cloud-builders/git'
args: ['submodule', 'update', '--remote', '--init']
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'osm-addr-tools', '.']
- name: 'gcr.io/cloud-builders/docker'
args: ['run', '--name', 'osm-addr-tools', 'osm-addr-tools', '/app/prepare-dictionaries.sh']
- name: 'gcr.io/cloud-builders/docker'
args: ['commit', '-c', "CMD /app/docker-entrypoint.sh",'osm-addr-tools', 'osm-addr-tools-step2']
- name: 'gcr.io/cloud-builders/docker'
args: ['rm', 'osm-addr-tools']
- name: 'gcr.io/cloud-builders/docker'
args: ['run', '--rm', 'osm-addr-tools-step2', '/app/venv/bin/python', '-m', 'unittest', 'discover', '-t' , '/app', '-s',
'/app/tests']
- name: 'gcr.io/cloud-builders/docker'
args: ['tag', 'osm-addr-tools-step2', '${_IMAGE_NAME}']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', '${_IMAGE_NAME}']
- name: 'gcr.io/cloud-builders/gcloud'
args: ['beta', 'run', 'deploy', 'osm-addr-tools',
'--image=${_IMAGE_NAME}',
'--region=us-central1',
'--memory=768Mi',
'--allow-unauthenticated',
'--set-env-vars=DISABLE_UPDATE=True'
]
images: ['${_IMAGE_NAME}']
substitutions:
_IMAGE_NAME: 'gcr.io/osm-vink/osm-addr-tools:latest'
timeout: 1800s