This repository has been archived by the owner on Oct 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 82
/
cloudbuild-ubuntu.yaml
248 lines (226 loc) · 10.7 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
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
# grab gcp-php packages from GCS
- name: google/cloud-sdk:252.0.0-slim
args: ['gsutil', '-m', 'cp', '-r', 'gs://$_GCP_PACKAGE_BUCKET/$_RUNTIME_DISTRIBUTION', '/workspace/php-base']
waitFor: ['-']
id: gsutil
# 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: ['gsutil']
id: php-base
- name: gcr.io/gcp-runtimes/container-structure-test
args: ['test','-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php-base:$_TAG', '--config', '/workspace/php-base/php-base.yaml', '-v', 'debug']
waitFor: ['php-base']
id: php-base-structure
# php80
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php80:$_TAG', '--build-arg', 'PHP_VERSION=8.0', '.']
dir: php-versioned
waitFor: ['php-base']
id: php80
- name: gcr.io/gcp-runtimes/container-structure-test
args: ['test','-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php80:$_TAG', '--config', '/workspace/php-versioned/php80.yaml', '-v', 'debug']
waitFor: ['php80']
id: php80-structure
# php74
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php74:$_TAG', '--build-arg', 'PHP_VERSION=7.4', '.']
dir: php-versioned
waitFor: ['php-base']
id: php74
- name: gcr.io/gcp-runtimes/container-structure-test
args: ['test','-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php74:$_TAG', '--config', '/workspace/php-versioned/php74.yaml', '-v', 'debug']
waitFor: ['php74']
id: php74-structure
# php73
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php73:$_TAG', '--build-arg', 'PHP_VERSION=7.3', '.']
dir: php-versioned
waitFor: ['php-base']
id: php73
- name: gcr.io/gcp-runtimes/container-structure-test
args: ['test','-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php73:$_TAG', '--config', '/workspace/php-versioned/php73.yaml', '-v', 'debug']
waitFor: ['php73']
id: php73-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: ['php80-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: ['php80']
id: php-onbuild
- name: gcr.io/gcp-runtimes/container-structure-test
args: ['test','-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php:$_TAG', '--config', '/workspace/php-onbuild/php.yaml', '-v', 'debug']
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', '--php73-image', 'gcr.io/${_GOOGLE_PROJECT_ID}/php73:$_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/container-structure-test
args: ['test','-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php-default:$_TAG', '--config', '/workspace/testapps/php_default/php_default.yaml', '-v', 'debug']
waitFor: ['php-default-build']
id: php-default-test
# php80-custom test
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php80-custom:$_TAG', '.']
dir: testapps/php80_custom
waitFor: ['php-onbuild']
id: php80-custom-build
- name: gcr.io/gcp-runtimes/container-structure-test
args: ['test','-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php80-custom:$_TAG', '--config', '/workspace/testapps/php80_custom/php80.yaml', '-v', 'debug']
waitFor: ['php80-custom-build']
- name: gcr.io/cloud-builders/docker
args: ['run', '--net=nw_$_TAG', '--name=php80-custom', '-d', 'gcr.io/${_GOOGLE_PROJECT_ID}/php80-custom:$_TAG']
waitFor: ['php80-custom-build', 'test-network']
id: php80-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/php80_custom/tests']
waitFor: ['php80-custom-app', 'test-runner']
id: php80-custom-test
# php74-custom test
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php74-custom:$_TAG', '.']
dir: testapps/php74_custom
waitFor: ['php-onbuild']
id: php74-custom-build
- name: gcr.io/gcp-runtimes/container-structure-test
args: ['test','-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php74-custom:$_TAG', '--config', '/workspace/testapps/php74_custom/php74.yaml', '-v', 'debug']
waitFor: ['php74-custom-build']
- name: gcr.io/cloud-builders/docker
args: ['run', '--net=nw_$_TAG', '--name=php74-custom', '-d', 'gcr.io/${_GOOGLE_PROJECT_ID}/php74-custom:$_TAG']
waitFor: ['php74-custom-build', 'test-network']
id: php74-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/php74_custom/tests']
waitFor: ['php74-custom-app', 'test-runner']
id: php74-custom-test
# php73-custom test
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php73-custom:$_TAG', '.']
dir: testapps/php73_custom
waitFor: ['php-onbuild']
id: php73-custom-build
- name: gcr.io/gcp-runtimes/container-structure-test
args: ['test','-i', 'gcr.io/${_GOOGLE_PROJECT_ID}/php73-custom:$_TAG', '--config', '/workspace/testapps/php73_custom/php73.yaml', '-v', 'debug']
waitFor: ['php73-custom-build']
- name: gcr.io/cloud-builders/docker
args: ['run', '--net=nw_$_TAG', '--name=php73-custom', '-d', 'gcr.io/${_GOOGLE_PROJECT_ID}/php73-custom:$_TAG']
waitFor: ['php73-custom-build', 'test-network']
id: php73-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/php73_custom/tests']
waitFor: ['php73-custom-app', 'test-runner']
id: php73-custom-test
# php73-extensions test
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php73-extensions:$_TAG', '.']
dir: testapps/php73_extensions
waitFor: ['php-onbuild']
id: php73-extensions-build
- name: gcr.io/cloud-builders/docker
args: ['run', 'gcr.io/${_GOOGLE_PROJECT_ID}/php73-extensions:$_TAG', 'vendor/bin/phpunit']
dir: testapps/php73_extensions
waitFor: ['php73-extensions-build']
id: php73-extensions-test
# php73-extensions-legacy test
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php73-extensions:$_TAG', '.']
dir: testapps/php73_extensions_legacy
waitFor: ['php-onbuild']
id: php73-extensions-legacy-build
- name: gcr.io/cloud-builders/docker
args: ['run', 'gcr.io/${_GOOGLE_PROJECT_ID}/php73-extensions:$_TAG', 'vendor/bin/phpunit']
dir: testapps/php73_extensions_legacy
waitFor: ['php73-extensions-legacy-build']
id: php73-extensions-legacy-test
# php74-extensions test
- name: gcr.io/cloud-builders/docker
args: [ 'build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php74-extensions:$_TAG', '.' ]
dir: testapps/php74_extensions
waitFor: [ 'php-onbuild' ]
id: php74-extensions-build
- name: gcr.io/cloud-builders/docker
args: [ 'run', 'gcr.io/${_GOOGLE_PROJECT_ID}/php74-extensions:$_TAG', 'vendor/bin/phpunit' ]
dir: testapps/php74_extensions
waitFor: [ 'php74-extensions-build' ]
id: php74-extensions-test
# php74-extensions-legacy test
- name: gcr.io/cloud-builders/docker
args: [ 'build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php74-extensions:$_TAG', '.' ]
dir: testapps/php74_extensions_legacy
waitFor: [ 'php-onbuild' ]
id: php74-extensions-legacy-build
- name: gcr.io/cloud-builders/docker
args: [ 'run', 'gcr.io/${_GOOGLE_PROJECT_ID}/php74-extensions:$_TAG', 'vendor/bin/phpunit' ]
dir: testapps/php74_extensions_legacy
waitFor: [ 'php74-extensions-build' ]
id: php74-extensions-legacy-test
# php80-extensions test - fix php80-vips
- name: gcr.io/cloud-builders/docker
args: [ 'build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php80-extensions:$_TAG', '.' ]
dir: testapps/php80_extensions
waitFor: [ 'php-onbuild' ]
id: php80-extensions-build
- name: gcr.io/cloud-builders/docker
args: [ 'run', 'gcr.io/${_GOOGLE_PROJECT_ID}/php80-extensions:$_TAG', 'vendor/bin/phpunit' ]
dir: testapps/php80_extensions
waitFor: [ 'php80-extensions-build' ]
id: php80-extensions-test
# php80-extensions-legacy test
- name: gcr.io/cloud-builders/docker
args: [ 'build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/php80-extensions:$_TAG', '.' ]
dir: testapps/php80_extensions_legacy
waitFor: [ 'php-onbuild' ]
id: php80-extensions-legacy-build
- name: gcr.io/cloud-builders/docker
args: [ 'run', 'gcr.io/${_GOOGLE_PROJECT_ID}/php80-extensions:$_TAG', 'vendor/bin/phpunit' ]
dir: testapps/php80_extensions_legacy
waitFor: [ 'php80-extensions-build' ]
id: php80-extensions-legacy-test
images:
- gcr.io/${_GOOGLE_PROJECT_ID}/php-base:$_TAG
- gcr.io/${_GOOGLE_PROJECT_ID}/php:$_TAG
- gcr.io/${_GOOGLE_PROJECT_ID}/php80:$_TAG
- gcr.io/${_GOOGLE_PROJECT_ID}/php74:$_TAG
- gcr.io/${_GOOGLE_PROJECT_ID}/php73:$_TAG
- gcr.io/${_GOOGLE_PROJECT_ID}/php/gen-dockerfile:$_TAG
- gcr.io/${_GOOGLE_PROJECT_ID}/php-test-runner:$_TAG
options:
machineType: 'N1_HIGHCPU_8'