-
Notifications
You must be signed in to change notification settings - Fork 377
/
cloudbuild_pr.yaml
152 lines (147 loc) · 4.34 KB
/
cloudbuild_pr.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
# This file contains configuration for Cloud Builds triggered by pull requests
# to this repository.
timeout: 1800s
substitutions:
_CLUSTER_NAME: trillian-opensource-ci
_MASTER_ZONE: us-central1-a
_MYSQL_TAG: "8.0"
_MYSQL_ROOT_PASSWORD: ""
_MYSQL_PASSWORD: ""
options:
machineType: E2_HIGHCPU_32
steps:
- id: build_db_server
name: gcr.io/kaniko-project/executor:v1.20.0
args:
- --dockerfile=examples/deployment/docker/db_server/Dockerfile
- --destination=gcr.io/${PROJECT_ID}/db_server:${COMMIT_SHA}
- --cache=true
- --cache-dir= # Cache is in Google Container Registry.
- id: build_log_server
name: gcr.io/kaniko-project/executor:v1.20.0
args:
- --dockerfile=examples/deployment/docker/log_server/Dockerfile
- --destination=gcr.io/${PROJECT_ID}/log_server:${COMMIT_SHA}
- --cache=true
- --cache-dir= # Cache is in Google Container Registry
waitFor: ['-']
- id: build_log_signer
name: gcr.io/kaniko-project/executor:v1.20.0
args:
- --dockerfile=examples/deployment/docker/log_signer/Dockerfile
- --destination=gcr.io/${PROJECT_ID}/log_signer:${COMMIT_SHA}
- --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: ["-"]
- id: apply_k8s_cfgs_for_clusterwide_etcd_operator_dryrun
name: gcr.io/cloud-builders/kubectl
args:
- apply
- --dry-run=server
- -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
env:
- PROJECT_ID=${PROJECT_ID}
- IMAGE_TAG=${COMMIT_SHA}
waitFor:
- build_envsubst
- copy_k8s_cfgs_for_spanner
- id: apply_k8s_cfgs_for_spanner_dryrun
name: gcr.io/cloud-builders/kubectl
args:
- apply
- --dry-run=server
- -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
- --prune
- --all
- --prune-allowlist=core/v1/ConfigMap
env:
- CLOUDSDK_COMPUTE_ZONE=${_MASTER_ZONE}
- CLOUDSDK_CONTAINER_CLUSTER=${_CLUSTER_NAME}
waitFor:
- envsubst_k8s_cfgs_for_spanner
- build_log_server
- build_log_signer
- 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
env:
- PROJECT_ID=${PROJECT_ID}
- IMAGE_TAG=${COMMIT_SHA}
- MYSQL_ROOT_PASSWORD=${_MYSQL_ROOT_PASSWORD}
- MYSQL_PASSWORD=${_MYSQL_PASSWORD}
waitFor:
- build_envsubst
- copy_k8s_cfgs_for_mysql
- id: apply_k8s_cfgs_for_mysql_dryrun
name: gcr.io/cloud-builders/kubectl
args:
- apply
- --dry-run=server
- --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
- --prune
- --all
- --prune-allowlist=core/v1/ConfigMap
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