forked from google/trillian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloudbuild.yaml
138 lines (138 loc) · 3.63 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
substitutions:
_CLUSTER_NAME: trillian-opensource-ci
_MASTER_ZONE: us-central1-a
_CONFIG_MAP: examples/deployment/kubernetes/trillian-opensource-ci.yaml
_MYSQL_TAG: "5.7"
steps:
- id: pull_mysql
name : gcr.io/cloud-builders/docker
args:
- pull
- marketplace.gcr.io/google/mysql5:${_MYSQL_TAG}
- id: tag_mysql
name: gcr.io/cloud-builders/docker
args:
- tag
- marketplace.gcr.io/google/mysql5:${_MYSQL_TAG}
- gcr.io/${PROJECT_ID}/mysql5:${_MYSQL_TAG}
waitFor:
- pull_mysql
- id: push_mysql
name: gcr.io/cloud-builders/docker
args:
- push
- gcr.io/${PROJECT_ID}/mysql5:${_MYSQL_TAG}
waitFor:
- tag_mysql
- id: build_db_server
name: gcr.io/cloud-builders/docker
args:
- build
- --file=examples/deployment/docker/db_server/Dockerfile
- --tag=gcr.io/${PROJECT_ID}/db_server:${COMMIT_SHA}
- .
waitFor:
- push_mysql
- id: build_log_server
name: gcr.io/cloud-builders/docker
args:
- build
- --file=examples/deployment/docker/log_server/Dockerfile
- --tag=gcr.io/${PROJECT_ID}/log_server:${COMMIT_SHA}
- .
waitFor: ["-"]
- id: build_log_signer
name: gcr.io/cloud-builders/docker
args:
- build
- --file=examples/deployment/docker/log_signer/Dockerfile
- --tag=gcr.io/${PROJECT_ID}/log_signer:${COMMIT_SHA}
- .
waitFor: ["-"]
- id: build_map_server
name: gcr.io/cloud-builders/docker
args:
- build
- --file=examples/deployment/docker/map_server/Dockerfile
- --tag=gcr.io/${PROJECT_ID}/map_server:${COMMIT_SHA}
- .
waitFor: ["-"]
- id: push_log_server
name: gcr.io/cloud-builders/docker
args:
- push
- gcr.io/${PROJECT_ID}/log_server:${COMMIT_SHA}
waitFor:
- build_log_server
- id: push_log_signer
name: gcr.io/cloud-builders/docker
args:
- push
- gcr.io/${PROJECT_ID}/log_signer:${COMMIT_SHA}
waitFor:
- build_log_signer
- id: tag_latest_log_server
name: gcr.io/cloud-builders/gcloud
args:
- container
- images
- add-tag
- gcr.io/${PROJECT_ID}/log_server:${COMMIT_SHA}
- gcr.io/${PROJECT_ID}/log_server:latest
waitFor:
- push_log_server
- id: tag_latest_log_signer
name: gcr.io/cloud-builders/gcloud
args:
- container
- images
- add-tag
- gcr.io/${PROJECT_ID}/log_signer:${COMMIT_SHA}
- gcr.io/${PROJECT_ID}/log_signer:latest
waitFor:
- push_log_signer
- id: build_envsubst
name: gcr.io/cloud-builders/docker
args:
- build
- examples/deployment/docker/envsubst
- -t
- envsubst
waitFor: ["-"]
- id: envsubst_kubernetes_configs
name: envsubst
args:
- ${_CONFIG_MAP}
- examples/deployment/kubernetes/trillian-log-deployment.yaml
- examples/deployment/kubernetes/trillian-log-service.yaml
- examples/deployment/kubernetes/trillian-log-signer-deployment.yaml
- examples/deployment/kubernetes/trillian-log-signer-service.yaml
env:
- PROJECT_ID=${PROJECT_ID}
- IMAGE_TAG=${COMMIT_SHA}
waitFor:
- build_envsubst
- id: update_kubernetes_configs
name: gcr.io/cloud-builders/kubectl
args:
- apply
- -f=${_CONFIG_MAP}
- -f=examples/deployment/kubernetes/trillian-log-deployment.yaml
- -f=examples/deployment/kubernetes/trillian-log-service.yaml
- -f=examples/deployment/kubernetes/trillian-log-signer-deployment.yaml
- -f=examples/deployment/kubernetes/trillian-log-signer-service.yaml
- --prune
- --all
- --prune-whitelist=core/v1/ConfigMap
env:
- CLOUDSDK_COMPUTE_ZONE=${_MASTER_ZONE}
- CLOUDSDK_CONTAINER_CLUSTER=${_CLUSTER_NAME}
waitFor:
- envsubst_kubernetes_configs
- push_log_server
- push_log_signer
images:
- gcr.io/${PROJECT_ID}/db_server:${COMMIT_SHA}
- gcr.io/${PROJECT_ID}/log_server:${COMMIT_SHA}
- gcr.io/${PROJECT_ID}/log_signer:${COMMIT_SHA}
- gcr.io/${PROJECT_ID}/map_server:${COMMIT_SHA}