-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathcloudbuild.yaml
54 lines (49 loc) · 1.46 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
options:
machineType: 'N1_HIGHCPU_8'
steps:
- id: &BUILD_ALL Build all
name: gcr.io/cloud-builders/bazel
args:
- build
- java/com/google/cloud/deploymentmanager/autogen/...:all
- javatests/com/google/cloud/deploymentmanager/autogen/...:all
- id: &TEST_ALL Test all
name: gcr.io/cloud-builders/bazel
waitFor: [*BUILD_ALL]
args:
- test
- javatests/com/google/cloud/deploymentmanager/autogen/...:all
- id: &BUILD Build image
waitFor: [*BUILD_ALL, *TEST_ALL]
name: gcr.io/cloud-builders/bazel
args:
# This bazel run command installs the built image into docker.
- run
- java/com/google/cloud/deploymentmanager/autogen/cli:docker_image
- --
- --norun
- id: Retag image latest
waitFor: [*BUILD]
name: gcr.io/cloud-builders/docker
args:
- tag
- bazel/java/com/google/cloud/deploymentmanager/autogen/cli:docker_image
- gcr.io/$PROJECT_ID/dm/autogen:latest
- id: Retag image full SHA
waitFor: [*BUILD]
name: gcr.io/cloud-builders/docker
args:
- tag
- bazel/java/com/google/cloud/deploymentmanager/autogen/cli:docker_image
- gcr.io/$PROJECT_ID/dm/autogen:sha_$COMMIT_SHA
- id: Retag image short SHA
waitFor: [*BUILD]
name: gcr.io/cloud-builders/docker
args:
- tag
- bazel/java/com/google/cloud/deploymentmanager/autogen/cli:docker_image
- gcr.io/$PROJECT_ID/dm/autogen:sha_$SHORT_SHA
images:
- gcr.io/$PROJECT_ID/dm/autogen:latest
- gcr.io/$PROJECT_ID/dm/autogen:sha_$SHORT_SHA
- gcr.io/$PROJECT_ID/dm/autogen:sha_$COMMIT_SHA