forked from GoogleCloudPlatform/php-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloudbuild-ubuntu.yaml
303 lines (280 loc) · 13.4 KB
/
cloudbuild-ubuntu.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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
steps:
# test network for making local docker http requests
- name: gcr.io/cloud-builders/docker
args: ['network', 'create', '-d', 'bridge', 'nw_$_TAG']
waitFor: ['-']
id: test-network
# php-base
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php-base:$_TAG', '--build-arg', 'RUNTIME_DISTRIBUTION=$_RUNTIME_DISTRIBUTION', '.']
dir: php-base
waitFor: ['-']
id: php-base
- name: gcr.io/gcp-runtimes/structure_test
args: ['-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php-base:$_TAG', '--config', '/workspace/php-base/php-base.yaml', '-v']
waitFor: ['php-base']
id: php-base-structure
# php72
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php72:$_TAG', '--build-arg', 'PHP_VERSION=7.2', '.']
dir: php-versioned
waitFor: ['php-base']
id: php72
- name: gcr.io/gcp-runtimes/structure_test
args: ['-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php72:$_TAG', '--config', '/workspace/php-versioned/php72.yaml', '-v']
waitFor: ['php72']
id: php72-structure
# php71
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php71:$_TAG', '--build-arg', 'PHP_VERSION=7.1', '.']
dir: php-versioned
waitFor: ['php-base']
id: php71
- name: gcr.io/gcp-runtimes/structure_test
args: ['-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php71:$_TAG', '--config', '/workspace/php-versioned/php71.yaml', '-v']
waitFor: ['php71']
id: php71-structure
# php70
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php70:$_TAG', '--build-arg', 'PHP_VERSION=7.0', '.']
dir: php-versioned
waitFor: ['php-base']
id: php70
- name: gcr.io/gcp-runtimes/structure_test
args: ['-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php70:$_TAG', '--config', '/workspace/php-versioned/php70.yaml', '-v']
waitFor: ['php70']
id: php70-structure
# php56
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php56:$_TAG', '--build-arg', 'PHP_VERSION=5.6', '.']
dir: php-versioned
waitFor: ['php-base']
id: php56
- name: gcr.io/gcp-runtimes/structure_test
args: ['-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php56:$_TAG', '--config', '/workspace/php-versioned/php56.yaml', '-v']
waitFor: ['php56']
id: php56-structure
# test runner
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php-test-runner:$_TAG', '.']
dir: cloudbuild-test-runner
waitFor: ['php56-structure']
id: test-runner
# base tests
- name: gcr.io/cloud-builders/docker
args: ['run', '-v', '/workspace/php-base:/workspace', 'gcr.io/${_GOOGLE_PROJECT_ID}/php-test-runner:$_TAG']
id: php-base-tests
waitFor: ['test-runner', 'php-base']
# php-onbuild
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php:$_TAG', '.']
dir: php-onbuild
waitFor: ['php71']
id: php-onbuild
- name: gcr.io/gcp-runtimes/structure_test
args: ['-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php:$_TAG', '--config', '/workspace/php-onbuild/php.yaml', '-v']
waitFor: ['php-onbuild']
id: php-onbuild-structure
# gen-dockerfile
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php/gen-dockerfile:$_TAG', '.']
dir: builder/gen-dockerfile
waitFor: ['php-onbuild']
id: gen-dockerfile
- name: gcr.io/cloud-builders/docker
args: ['run', '-v', '/workspace/builder/gen-dockerfile:/workspace', 'gcr.io/${_GOOGLE_PROJECT_ID}/php-test-runner:$_TAG']
waitFor: ['test-runner']
- name: gcr.io/${_GOOGLE_PROJECT_ID}/php/gen-dockerfile:$_TAG
args: ['--workspace', '/workspace/testapps/builder_test', '--php56-image', 'gcr.io/${_GOOGLE_PROJECT_ID}/php56:$_TAG', '--php70-image', 'gcr.io/${_GOOGLE_PROJECT_ID}/php70:$_TAG', '--php71-image', 'gcr.io/${_GOOGLE_PROJECT_ID}/php71:$_TAG']
waitFor: ['gen-dockerfile']
id: gen-dockerfile-run
- name: gcr.io/cloud-builders/docker
args: ['run', '-v', '/workspace/testapps/builder_test:/workspace', 'gcr.io/${_GOOGLE_PROJECT_ID}/php-test-runner:$_TAG']
waitFor: ['gen-dockerfile-run', 'test-runner']
id: gen-dockerfile-test
# php-default test
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php-default:$_TAG', '.']
dir: testapps/php_default
waitFor: ['php-onbuild']
id: php-default-build
- name: gcr.io/gcp-runtimes/structure_test
args: ['-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php-default:$_TAG', '--config', 'php_default.yaml', '-v']
waitFor: ['php-default-build']
id: php-default-test
# php56 test
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php56-test:$_TAG', '.']
dir: testapps/php56
waitFor: ['php-onbuild']
id: php56-build
- name: gcr.io/gcp-runtimes/structure_test
args: ['-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php56-test:$_TAG', '--config', 'php56.yaml', '-v']
waitFor: ['php56-build']
- name: gcr.io/cloud-builders/docker
args: ['run', '--net=nw_$_TAG', '--name=php56-test', '-d', 'gcr.io/${_GOOGLE_PROJECT_ID}/php56-test:$_TAG']
waitFor: ['php56-build', 'test-network']
id: php56-app
- name: gcr.io/cloud-builders/docker
args: ['run', '--net=nw_$_TAG', '-v', '/workspace:/workspace', 'gcr.io/${_GOOGLE_PROJECT_ID}/php-test-runner:$_TAG', '/workspace/testapps/php56']
waitFor: ['php56-app', 'test-runner']
id: php56-test
# php56-custom test
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php56-custom:$_TAG', '.']
dir: testapps/php56_custom
waitFor: ['php-onbuild']
id: php56-custom-build
- name: gcr.io/gcp-runtimes/structure_test
args: ['-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php56-custom:$_TAG', '--config', 'php56_custom.yaml', '-v']
waitFor: ['php56-custom-build']
- name: gcr.io/cloud-builders/docker
args: ['run', '--net=nw_$_TAG', '--name=php56-custom', '-d', 'gcr.io/${_GOOGLE_PROJECT_ID}/php56-custom:$_TAG']
waitFor: ['php56-custom-build', 'test-network']
id: php56-custom-app
- name: gcr.io/cloud-builders/docker
args: ['run', '--net=nw_$_TAG','-v', '/workspace:/workspace', '--env', 'EXTRA_COMPOSER_FLAGS=--ignore-platform-reqs', 'gcr.io/${_GOOGLE_PROJECT_ID}/php-test-runner:$_TAG', '/workspace/testapps/php56_custom']
waitFor: ['php56-custom-app', 'test-runner']
id: php56-custom-test
# php56-custom-configs test
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php56-custom-configs:$_TAG', '.']
dir: testapps/php56_custom_configs
waitFor: ['php-onbuild']
id: php56-custom-configs-build
- name: gcr.io/cloud-builders/docker
args: ['run', '--net=nw_$_TAG', '--name=php56-custom-configs', '-d', 'gcr.io/${_GOOGLE_PROJECT_ID}/php56-custom-configs:$_TAG']
waitFor: ['php56-custom-configs-build', 'test-network']
id: php56-custom-configs-app
- name: gcr.io/cloud-builders/docker
args: ['run', '--net=nw_$_TAG', '-v', '/workspace:/workspace', 'gcr.io/${_GOOGLE_PROJECT_ID}/php-test-runner:$_TAG', '/workspace/testapps/php56_custom_configs']
waitFor: ['php56-custom-configs-app', 'test-runner']
id: php56-custom-configs-test
# php56-extensions test
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php56-extensions:$_TAG', '.']
dir: testapps/php56_extensions
waitFor: ['php-onbuild']
id: php56-extensions-build
- name: gcr.io/cloud-builders/docker
args: ['run', 'gcr.io/${_GOOGLE_PROJECT_ID}/php56-extensions:$_TAG', 'vendor/bin/phpunit']
dir: testapps/php56_extensions
waitFor: ['php56-extensions-build']
id: php56-extensions-test
# php56-nginx-conf test
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php56-nginx-conf:$_TAG', '.']
dir: testapps/php56_nginx_conf
waitFor: ['php-onbuild']
id: php56-nginx-conf-build
- name: gcr.io/cloud-builders/docker
args: ['run', '--net=nw_$_TAG', '--name=php56-nginx-conf', '-d', 'gcr.io/${_GOOGLE_PROJECT_ID}/php56-nginx-conf:$_TAG']
waitFor: ['php56-nginx-conf-build', 'test-network']
- name: gcr.io/cloud-builders/docker
args: ['run', '--net=nw_$_TAG', '-v', '/workspace:/workspace', 'gcr.io/${_GOOGLE_PROJECT_ID}/php-test-runner:$_TAG', '/workspace/testapps/php56_nginx_conf']
waitFor: ['php56-nginx-conf-build', 'test-runner']
id: php56-nginx-conf-test
# php70-custom test
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php70-custom:$_TAG', '.']
dir: testapps/php70_custom
waitFor: ['php-onbuild']
id: php70-custom-build
- name: gcr.io/gcp-runtimes/structure_test
args: ['-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php70-custom:$_TAG', '--config', 'php70.yaml', '-v']
waitFor: ['php70-custom-build']
- name: gcr.io/cloud-builders/docker
args: ['run', '--net=nw_$_TAG', '--name=php70-custom', '-d', 'gcr.io/${_GOOGLE_PROJECT_ID}/php70-custom:$_TAG']
waitFor: ['php70-custom-build', 'test-network']
id: php70-custom-app
- name: gcr.io/cloud-builders/docker
args: ['run', '--net=nw_$_TAG','-v', '/workspace:/workspace', 'gcr.io/${_GOOGLE_PROJECT_ID}/php-test-runner:$_TAG', '/workspace/testapps/php70_custom/tests']
waitFor: ['php70-custom-app', 'test-runner']
id: php70-custom-test
# php70-extensions test
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php70-extensions:$_TAG', '.']
dir: testapps/php70_extensions
waitFor: ['php-onbuild']
id: php70-extensions-build
- name: gcr.io/cloud-builders/docker
args: ['run', 'gcr.io/${_GOOGLE_PROJECT_ID}/php70-extensions:$_TAG', 'vendor/bin/phpunit']
dir: testapps/php70_extensions
waitFor: ['php70-extensions-build']
id: php70-extensions-test
# php71-custom test
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php71-custom:$_TAG', '.']
dir: testapps/php71_custom
waitFor: ['php-onbuild']
id: php71-custom-build
- name: gcr.io/gcp-runtimes/structure_test
args: ['-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php71-custom:$_TAG', '--config', 'php71.yaml', '-v']
waitFor: ['php71-custom-build']
- name: gcr.io/cloud-builders/docker
args: ['run', '--net=nw_$_TAG', '--name=php71-custom', '-d', 'gcr.io/${_GOOGLE_PROJECT_ID}/php71-custom:$_TAG']
waitFor: ['php71-custom-build', 'test-network']
id: php71-custom-app
- name: gcr.io/cloud-builders/docker
args: ['run', '--net=nw_$_TAG','-v', '/workspace:/workspace', 'gcr.io/${_GOOGLE_PROJECT_ID}/php-test-runner:$_TAG', '/workspace/testapps/php71_custom/tests']
waitFor: ['php71-custom-app', 'test-runner']
id: php71-custom-test
# php72-custom test
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php72-custom:$_TAG', '.']
dir: testapps/php72_custom
waitFor: ['php-onbuild']
id: php72-custom-build
- name: gcr.io/gcp-runtimes/structure_test
args: ['-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php72-custom:$_TAG', '--config', 'php72.yaml', '-v']
waitFor: ['php72-custom-build']
- name: gcr.io/cloud-builders/docker
args: ['run', '--net=nw_$_TAG', '--name=php72-custom', '-d', 'gcr.io/${_GOOGLE_PROJECT_ID}/php72-custom:$_TAG']
waitFor: ['php72-custom-build', 'test-network']
id: php72-custom-app
- name: gcr.io/cloud-builders/docker
args: ['run', '--net=nw_$_TAG','-v', '/workspace:/workspace', 'gcr.io/${_GOOGLE_PROJECT_ID}/php-test-runner:$_TAG', '/workspace/testapps/php72_custom/tests']
waitFor: ['php72-custom-app', 'test-runner']
id: php72-custom-test
# php71-extensions test
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php71-extensions:$_TAG', '.']
dir: testapps/php71_extensions
waitFor: ['php-onbuild']
id: php71-extensions-build
- name: gcr.io/cloud-builders/docker
args: ['run', 'gcr.io/${_GOOGLE_PROJECT_ID}/php71-extensions:$_TAG', 'vendor/bin/phpunit']
dir: testapps/php71_extensions
waitFor: ['php71-extensions-build']
id: php71-extensions-test
# php72-extensions test
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php72-extensions:$_TAG', '.']
dir: testapps/php72_extensions
waitFor: ['php-onbuild']
id: php72-extensions-build
- name: gcr.io/cloud-builders/docker
args: ['run', 'gcr.io/${_GOOGLE_PROJECT_ID}/php72-extensions:$_TAG', 'vendor/bin/phpunit']
dir: testapps/php72_extensions
waitFor: ['php72-extensions-build']
id: php72-extensions-test
# php72-extensions-legacy test
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php72-extensions:$_TAG', '.']
dir: testapps/php72_extensions_legacy
waitFor: ['php-onbuild']
id: php72-extensions-legacy-build
- name: gcr.io/cloud-builders/docker
args: ['run', 'gcr.io/${_GOOGLE_PROJECT_ID}/php72-extensions:$_TAG', 'vendor/bin/phpunit']
dir: testapps/php72_extensions_legacy
waitFor: ['php72-extensions-build']
id: php72-extensions-legacy-test
images:
- gcr.io/${_GOOGLE_PROJECT_ID}/php-base:$_TAG
- gcr.io/${_GOOGLE_PROJECT_ID}/php:$_TAG
- gcr.io/${_GOOGLE_PROJECT_ID}/php72:$_TAG
- gcr.io/${_GOOGLE_PROJECT_ID}/php71:$_TAG
- gcr.io/${_GOOGLE_PROJECT_ID}/php70:$_TAG
- gcr.io/${_GOOGLE_PROJECT_ID}/php56:$_TAG
- gcr.io/${_GOOGLE_PROJECT_ID}/php/gen-dockerfile:$_TAG
- gcr.io/${_GOOGLE_PROJECT_ID}/php-test-runner:$_TAG