forked from google/trillian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild_master.yaml
182 lines (182 loc) · 5.57 KB
/
cloudbuild_master.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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
timeout: 1800s
substitutions:
_CLUSTER_NAME: trillian-opensource-ci
_MASTER_ZONE: us-central1-a
_MYSQL_TAG: "5.7"
_MYSQL_ROOT_PASSWORD: ""
_MYSQL_PASSWORD: ""
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/kaniko-project/executor
args:
- --dockerfile=examples/deployment/docker/db_server/Dockerfile
- --destination=gcr.io/${PROJECT_ID}/db_server:${COMMIT_SHA}
- --destination=gcr.io/${PROJECT_ID}/db_server:latest
- --cache=true
- --cache-dir= # Cache is in Google Container Registry
waitFor:
- push_mysql
- id: build_log_server
name: gcr.io/kaniko-project/executor
args:
- --dockerfile=examples/deployment/docker/log_server/Dockerfile
- --destination=gcr.io/${PROJECT_ID}/log_server:${COMMIT_SHA}
- --destination=gcr.io/${PROJECT_ID}/log_server:latest
- --cache=true
- --cache-dir= # Cache is in Google Container Registry
waitFor: ["-"]
- id: build_log_signer
name: gcr.io/kaniko-project/executor
args:
- --dockerfile=examples/deployment/docker/log_signer/Dockerfile
- --destination=gcr.io/${PROJECT_ID}/log_signer:${COMMIT_SHA}
- --destination=gcr.io/${PROJECT_ID}/log_signer:latest
- --cache=true
- --cache-dir= # Cache is in Google Container Registry
waitFor: ["-"]
- id: build_map_server
name: gcr.io/kaniko-project/executor
args:
- --dockerfile=examples/deployment/docker/map_server/Dockerfile
- --destination=gcr.io/${PROJECT_ID}/map_server:${COMMIT_SHA}
- --destination=gcr.io/${PROJECT_ID}/map_server:latest
- --cache=true
- --cache-dir= # Cache is in Google Container Registry
waitFor: ["-"]
- id: build_envsubst
name: gcr.io/cloud-builders/docker
args:
- build
- examples/deployment/docker/envsubst
- -t
- envsubst
waitFor: ["-"]
# etcd-operator requires that a ClusterRole has been created for it already.
# Do this manually using examples/deployment/kubernetes/etcd-role*.yaml.
- id: apply_k8s_cfgs_for_clusterwide_etcd_operator
name: gcr.io/cloud-builders/kubectl
args:
- apply
- -f=examples/deployment/kubernetes/etcd-deployment.yaml
env:
- CLOUDSDK_COMPUTE_ZONE=${_MASTER_ZONE}
- CLOUDSDK_CONTAINER_CLUSTER=${_CLUSTER_NAME}
waitFor: ["-"]
- id: copy_k8s_cfgs_for_spanner
name: busybox
entrypoint: cp
args:
- -r
- examples/deployment/kubernetes/
- envsubst-spanner/
waitFor: ['-']
- id: envsubst_k8s_cfgs_for_spanner
name: envsubst
args:
- envsubst-spanner/etcd-cluster.yaml
- envsubst-spanner/trillian-ci-spanner.yaml
- envsubst-spanner/trillian-log-deployment.yaml
- envsubst-spanner/trillian-log-service.yaml
- envsubst-spanner/trillian-log-signer-deployment.yaml
- envsubst-spanner/trillian-log-signer-service.yaml
- envsubst-spanner/trillian-map-deployment.yaml
- envsubst-spanner/trillian-map-service.yaml
env:
- PROJECT_ID=${PROJECT_ID}
- IMAGE_TAG=${COMMIT_SHA}
waitFor:
- build_envsubst
- copy_k8s_cfgs_for_spanner
- id: apply_k8s_cfgs_for_spanner
name: gcr.io/cloud-builders/kubectl
args:
- apply
- -f=envsubst-spanner/etcd-cluster.yaml
- -f=envsubst-spanner/trillian-ci-spanner.yaml
- -f=envsubst-spanner/trillian-log-deployment.yaml
- -f=envsubst-spanner/trillian-log-service.yaml
- -f=envsubst-spanner/trillian-log-signer-deployment.yaml
- -f=envsubst-spanner/trillian-log-signer-service.yaml
- -f=envsubst-spanner/trillian-map-deployment.yaml
- -f=envsubst-spanner/trillian-map-service.yaml
env:
- CLOUDSDK_COMPUTE_ZONE=${_MASTER_ZONE}
- CLOUDSDK_CONTAINER_CLUSTER=${_CLUSTER_NAME}
waitFor:
- envsubst_k8s_cfgs_for_spanner
- build_log_server
- build_log_signer
- build_map_server
- id: copy_k8s_cfgs_for_mysql
name: busybox
entrypoint: cp
args:
- -r
- examples/deployment/kubernetes/
- envsubst-mysql/
waitFor: ['-']
- id: envsubst_k8s_cfgs_for_mysql
name: envsubst
args:
- envsubst-mysql/etcd-cluster.yaml
- envsubst-mysql/trillian-ci-mysql.yaml
- envsubst-mysql/trillian-mysql.yaml
- envsubst-mysql/trillian-log-deployment.yaml
- envsubst-mysql/trillian-log-service.yaml
- envsubst-mysql/trillian-log-signer-deployment.yaml
- envsubst-mysql/trillian-log-signer-service.yaml
- envsubst-mysql/trillian-map-deployment.yaml
- envsubst-mysql/trillian-map-service.yaml
env:
- PROJECT_ID=${PROJECT_ID}
- IMAGE_TAG=${COMMIT_SHA}
- MYSQL_ROOT_PASSWORD=${_MYSQL_ROOT_PASSWORD}
- MYSQL_USER=trillian
- MYSQL_PASSWORD=${_MYSQL_PASSWORD}
- MYSQL_DATABASE=trillian
waitFor:
- build_envsubst
- copy_k8s_cfgs_for_mysql
- id: apply_k8s_cfgs_for_mysql
name: gcr.io/cloud-builders/kubectl
args:
- apply
- --namespace=mysql
- -f=envsubst-mysql/etcd-cluster.yaml
- -f=envsubst-mysql/trillian-ci-mysql.yaml
- -f=envsubst-mysql/trillian-mysql.yaml
- -f=envsubst-mysql/trillian-log-deployment.yaml
- -f=envsubst-mysql/trillian-log-service.yaml
- -f=envsubst-mysql/trillian-log-signer-deployment.yaml
- -f=envsubst-mysql/trillian-log-signer-service.yaml
- -f=envsubst-mysql/trillian-map-deployment.yaml
- -f=envsubst-mysql/trillian-map-service.yaml
env:
- CLOUDSDK_COMPUTE_ZONE=${_MASTER_ZONE}
- CLOUDSDK_CONTAINER_CLUSTER=${_CLUSTER_NAME}
waitFor:
- envsubst_k8s_cfgs_for_mysql
- build_db_server
- build_log_server
- build_log_signer
- build_map_server