-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathcloudbuild.yaml
76 lines (72 loc) · 2.26 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# See https://cloud.google.com/cloud-build/docs/build-debug-locally for debug
# instructions.
#
# The copy/paste-able command:
# gcloud config configurations activate workbenchdata-ci # set PROJECT_ID
# cloud-build-local --dryrun=false --substitutions COMMIT_SHA=abc123 .
timeout: 2400s
options:
machineType: N1_HIGHCPU_8
steps:
# Build new Docker images.
#
# Does in-process verifications like `npm test` and `black`.
- name: 'gcr.io/cloud-builders/docker:20.10.3'
args: [ 'buildx', 'bake', '-f', 'docker-bake.hcl', 'default', 'unittest', 'integration-test' ]
env:
- 'REPOSITORY=gcr.io/$PROJECT_ID'
- 'TAG=$COMMIT_SHA'
# Unit-test
- name: 'docker/compose:1.28.6'
args: [ '-f', 'server/tests/docker-compose.yml',
'run',
'migrate'
]
env:
- 'PROJECT_ID=$PROJECT_ID'
- 'COMMIT_SHA=$COMMIT_SHA'
- name: 'docker/compose:1.28.6'
args: [ '-f', 'server/tests/docker-compose.yml',
'run',
'unittest'
]
env:
- 'PROJECT_ID=$PROJECT_ID'
- 'COMMIT_SHA=$COMMIT_SHA'
# Integration-test: upload-assets+migrate, then run the integration-test image
- name: 'docker/compose:1.28.6'
args: [ '-f', 'integrationtests/docker-compose.yml',
'-f', 'integrationtests/docker-compose.cloudbuild-override.yml',
'run',
'upload-assets'
]
env:
- 'PROJECT_ID=$PROJECT_ID'
- 'COMMIT_SHA=$COMMIT_SHA'
- name: 'docker/compose:1.28.6'
args: [ '-f', 'integrationtests/docker-compose.yml',
'-f', 'integrationtests/docker-compose.cloudbuild-override.yml',
'run',
'migrate'
]
env:
- 'PROJECT_ID=$PROJECT_ID'
- 'COMMIT_SHA=$COMMIT_SHA'
- name: 'docker/compose:1.28.6'
args: [ '-f', 'integrationtests/docker-compose.yml',
'-f', 'integrationtests/docker-compose.cloudbuild-override.yml',
'run',
'--use-aliases',
'integration-test'
]
env:
- 'PROJECT_ID=$PROJECT_ID'
- 'COMMIT_SHA=$COMMIT_SHA'
images:
- 'gcr.io/$PROJECT_ID/migrate:$COMMIT_SHA'
- 'gcr.io/$PROJECT_ID/upload-assets:$COMMIT_SHA'
- 'gcr.io/$PROJECT_ID/fetcher:$COMMIT_SHA'
- 'gcr.io/$PROJECT_ID/renderer:$COMMIT_SHA'
- 'gcr.io/$PROJECT_ID/cron:$COMMIT_SHA'
- 'gcr.io/$PROJECT_ID/frontend:$COMMIT_SHA'
- 'gcr.io/$PROJECT_ID/tusd-hooks:$COMMIT_SHA'