-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
35 lines (33 loc) · 995 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
26
27
28
29
30
31
32
33
34
35
steps:
- name: 'python:3.9'
args: ['pip3','install', '-r', 'requirements.txt', '-r', 'requirements-test.txt', '--user']
- name: 'python:3.9'
id: sourceReady
script: |
#!/usr/bin/env bash
patch -p1 -d $(pip show Flask | grep '^Location: ' | sed -e 's/Location: //') < cloud_ndb.patch
- name: 'python:3.9'
args: ['python3','-m', 'unittest']
waitFor: [sourceReady]
- name: 'python:3.9'
args: ['./pytype_script.sh']
waitFor: [sourceReady]
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/$PROJECT_ID/filter-feed:$COMMIT_SHA', '.']
waitFor: [-]
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/$PROJECT_ID/filter-feed:$COMMIT_SHA']
- name: 'gcr.io/cloud-builders/gcloud'
args:
- 'run'
- 'deploy'
- 'filter-feed'
- '--image'
- 'gcr.io/$PROJECT_ID/filter-feed:$COMMIT_SHA'
- '--region'
- 'us-central1'
- '--platform'
- 'managed'
- '--allow-unauthenticated'
images:
- 'gcr.io/$PROJECT_ID/filter-feed:$COMMIT_SHA'