forked from GoogleCloudPlatform/ubbagent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
54 lines (48 loc) · 964 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
options:
machineType: 'N1_HIGHCPU_8'
steps:
- id: &BazelBuild Bazel build and test
waitFor: ['-']
name: gcr.io/cloud-builders/bazel
entrypoint: bash
args:
- -exc
- |
bazel build ...
bazel test ...
- id: &BuildRuntime Build runtime
waitFor: ['-']
name: gcr.io/cloud-builders/docker
args:
- build
- --tag
- runtime:local
- -f
- cloudbuild.Dockerfile
- '.'
- id: &Test Test
waitFor:
- *BuildRuntime
name: runtime:local
entrypoint: bash
args:
- -exc
- |
make setup
make build
make test
make -j2 test-sdk-python2 test-sdk-python3
- id: &BuildImage Build Image
name: gcr.io/cloud-builders/docker
waitFor:
- *Test
args:
- build
- --tag
- gcr.io/$PROJECT_ID/metering/ubbagent:sha_$COMMIT_SHA
- --tag
- gcr.io/$PROJECT_ID/metering/ubbagent:sha_$SHORT_SHA
- .
images:
- gcr.io/$PROJECT_ID/metering/ubbagent:sha_$COMMIT_SHA
- gcr.io/$PROJECT_ID/metering/ubbagent:sha_$SHORT_SHA