/
config.yml
478 lines (454 loc) · 13.8 KB
/
config.yml
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
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
version: 2
jobs:
build:
machine:
image: ubuntu-2004:202010-01
working_directory: ~/ddev
environment:
DRUD_NONINTERACTIVE: "true"
steps:
- checkout
- run: sudo mkdir /home/linuxbrew && sudo chown $(id -u) /home/linuxbrew
- restore_cache:
keys:
- linux-v15
- run:
command: ./.circleci/linux_circle_vm_setup.sh
name: NORMAL Circle VM setup - tools, docker, golang
- run:
command: source ~/.bashrc && make staticrequired EXTRA_PATH=/home/linuxbrew/.linuxbrew/bin
name: staticrequired
- run:
command: |
make linux_amd64 linux_arm64 darwin_amd64 windows_amd64 windows_install EXTRA_PATH=/home/linuxbrew/.linuxbrew/bin
name: Build the ddev executables
- run:
command: ./.circleci/generate_artifacts.sh ~/artifacts
name: tar/zip up artifacts and make hashes
no_output_timeout: "40m"
- store_artifacts:
path: ~/artifacts
name: Store artifacts
- persist_to_workspace:
root: ~/
paths: ddev
- save_cache:
key: linux-v15
paths:
- /home/linuxbrew
- ~/.ddev/testcache
lx_nginx_fpm_test:
machine:
image: ubuntu-2004:202010-01
working_directory: ~/ddev
environment:
DDEV_TEST_WEBSERVER_TYPE: nginx-fpm
DRUD_NONINTERACTIVE: "true"
steps:
- attach_workspace:
at: ~/
- run: sudo mkdir /home/linuxbrew && sudo chown $(id -u) /home/linuxbrew
- restore_cache:
keys:
- linux-v15
# Run the built-in ddev tests with the executables just built.
- run:
command: ./.circleci/linux_circle_vm_setup.sh
name: Circle VM setup - tools, docker, golang
# Now build using the regular ddev-only technique - this results in a fully clean set of executables.
- run:
command: make -s test EXTRA_PATH=/home/linuxbrew/.linuxbrew/bin
name: ddev tests
no_output_timeout: "40m"
- store_test_results:
path: /tmp/testresults
- save_cache:
key: linux-v15
paths:
- /home/linuxbrew
- ~/.ddev/testcache
mac_nginx_fpm_test:
macos:
xcode: "11.3.1"
working_directory: ~/ddev
environment:
DDEV_TEST_WEBSERVER_TYPE: nginx-fpm
DRUD_NONINTERACTIVE: "true"
GOTEST_SHORT: "true"
steps:
- attach_workspace:
at: ~/
- restore_cache:
keys:
- macos-v16
# Run the built-in ddev tests with the executables just built.
- run:
command: ./.circleci/macos_circle_vm_setup.sh
name: macOS Circle VM setup - tools, docker, golang
# Now build using the regular ddev-only technique - this results in a fully clean set of executables.
- run:
command: make -s test
name: ddev tests
no_output_timeout: "40m"
- save_cache:
key: macos-v16
paths:
- ~/.ddev/testcache
- store_test_results:
path: /tmp/testresults
mac_apache_fpm_test:
macos:
xcode: "11.3.1"
working_directory: ~/ddev
environment:
DDEV_TEST_WEBSERVER_TYPE: apache-fpm
DRUD_NONINTERACTIVE: "true"
GOTEST_SHORT: "true"
steps:
- attach_workspace:
at: ~/
- restore_cache:
keys:
- macos-v16
# Run the built-in ddev tests with the executables just built.
- run:
command: ./.circleci/macos_circle_vm_setup.sh
name: macOS Circle VM setup - tools, docker, golang
# Now build using the regular ddev-only technique - this results in a fully clean set of executables.
- run:
command: make -s test
name: ddev tests
no_output_timeout: "40m"
- store_test_results:
path: /tmp/testresults
- save_cache:
key: macos-v16
paths:
- ~/.ddev/testcache
mac_nfsmount_test:
macos:
xcode: "11.3.1"
working_directory: ~/ddev
environment:
DDEV_TEST_USE_NFSMOUNT: "true"
DRUD_NONINTERACTIVE: "true"
GOTEST_SHORT: "true"
steps:
- attach_workspace:
at: ~/
- restore_cache:
keys:
- macos-v16
# Run the built-in ddev tests with the executables just built.
- run:
command: ./.circleci/macos_circle_vm_setup.sh
name: macOS Circle VM setup - tools, docker, golang
- run:
command: make -s test
name: ddev tests
no_output_timeout: "40m"
- store_test_results:
path: /tmp/testresults
- save_cache:
key: macos-v16
paths:
- ~/.ddev/testcache
lx_apache_fpm_test:
machine:
image: ubuntu-2004:202010-01
working_directory: ~/ddev
environment:
DDEV_TEST_WEBSERVER_TYPE: apache-fpm
# Experiment with only testing TYPO3 with the apache run.
GOTEST_SHORT: 5
DRUD_NONINTERACTIVE: "true"
steps:
- run: sudo mkdir /home/linuxbrew && sudo chown $(id -u) /home/linuxbrew
- restore_cache:
keys:
- linux-v15
- attach_workspace:
at: ~/
- run:
command: ./.circleci/linux_circle_vm_setup.sh
name: Circle VM setup - tools, docker, golang
# Now build using the regular ddev-only technique - this results in a fully clean set of executables.
# Run the built-in ddev tests with the executables just built.
- run:
command: make -s test EXTRA_PATH=/home/linuxbrew/.linuxbrew/bin
name: ddev tests
no_output_timeout: "120m"
- store_test_results:
path: /tmp/testresults
- save_cache:
key: linux-v15
paths:
- /home/linuxbrew
- ~/.ddev/testcache
lx_nfsmount_test:
machine:
image: ubuntu-2004:202010-01
working_directory: ~/ddev
environment:
DDEV_TEST_USE_NFSMOUNT: true
# Test only TYPO3 with the apache run.
GOTEST_SHORT: 5
DRUD_NONINTERACTIVE: "true"
steps:
- run: sudo mkdir /home/linuxbrew && sudo chown $(id -u) /home/linuxbrew
- restore_cache:
keys:
- linux-v15
- attach_workspace:
at: ~/
- run:
command: ./.circleci/linux_circle_vm_setup.sh
name: Circle VM setup - tools, docker, golang
# Now build using the regular ddev-only technique - this results in a fully clean set of executables.
# Run the built-in ddev tests with the executables just built.
- run:
# CircleCI image ubuntu-2004:202010-01 has umask 002, which results in
# default perms 700 for new directories, which doesn't seem to work with NFS
command: umask u=rwx,g=rwx,o=rx && make -s test EXTRA_PATH=/home/linuxbrew/.linuxbrew/bin
name: ddev tests
no_output_timeout: "120m"
- store_test_results:
path: /tmp/testresults
- save_cache:
key: linux-v15
paths:
- /home/linuxbrew
- ~/.ddev/testcache
staticrequired:
machine:
image: ubuntu-2004:202010-01
working_directory: ~/ddev
environment:
steps:
- checkout
- run: sudo mkdir /home/linuxbrew && sudo chown $(id -u) /home/linuxbrew
- restore_cache:
keys:
- linux-v15
- run:
command: ./.circleci/linux_circle_vm_setup.sh
name: Circle VM setup - tools, docker, golang
- run:
command: source ~/.bashrc && make staticrequired EXTRA_PATH=/home/linuxbrew/.linuxbrew/bin
name: staticrequired
lx_container_test:
machine:
image: ubuntu-2004:202010-01
working_directory: ~/ddev
environment:
GOTEST_SHORT: true
BUILDKIT_PROGRESS: plain
steps:
- checkout
- run: sudo mkdir /home/linuxbrew && sudo chown $(id -u) /home/linuxbrew
- restore_cache:
keys:
- linux-v15
- run:
command: ./.circleci/linux_circle_vm_setup.sh
name: Circle VM setup - tools, docker, golang
- run:
command: ./.circleci/linux_docker_buildx_setup.sh
name: Docker buildx setup for multi-arch builds
- run:
command: |
. ~/.bashrc
for dir in containers/*/
do pushd $dir
echo "--- Build container $dir"
time make container DOCKER_ARGS=--no-cache EXTRA_PATH=/home/linuxbrew/.linuxbrew/bin
echo "--- Test container $dir"
time make test EXTRA_PATH=/home/linuxbrew/.linuxbrew/bin
echo "--- Cross-compile container $dir"
time make multi-arch EXTRA_PATH=/home/linuxbrew/.linuxbrew/bin
popd
done
name: linux container test
- save_cache:
key: linux-v15
paths:
- /home/linuxbrew
- ~/.ddev/testcache
mac_container_test:
macos:
xcode: "11.3.1"
working_directory: ~/ddev
steps:
- checkout
- run:
command: ./.circleci/macos_circle_vm_setup.sh
name: macOS Circle VM setup - tools, docker, golang
- run:
command: |
for dir in containers/*
do pushd $dir
echo "--- Build container $dir"
time make container DOCKER_ARGS=--no-cache
echo "--- Test container $dir"
time make test
popd
done
name: macos container test
artifacts:
machine:
image: ubuntu-2004:202010-01
working_directory: ~/ddev
steps:
- run: sudo mkdir /home/linuxbrew && sudo chown $(id -u) /home/linuxbrew
- restore_cache:
keys:
- linux-v15
- attach_workspace:
at: ~/
- run:
command: ./.circleci/generate_artifacts.sh ~/artifacts
name: tar/zip up artifacts and make hashes
no_output_timeout: "40m"
- save_cache:
key: linux-v15
paths:
- /home/linuxbrew
- ~/.ddev/testcache
- store_artifacts:
path: ~/artifacts
name: Artifact storage
release_build:
macos:
xcode: "11.3.1"
working_directory: ~/ddev
environment:
DDEV_DEBUG: "true"
steps:
- checkout
- run:
command: ./.circleci/macos_circle_vm_setup.sh
name: RELEASE BUILD (macOS) Circle VM setup
- run: echo "version=$(make version) CIRCLE_TAG=${CIRCLE_TAG}"
- run:
command: make -s linux_amd64 linux_arm64 darwin_amd64 windows_amd64 windows_install chocolatey
- run:
command: make -s darwin_notarized
no_output_timeout: 30m
# We only build the xz version of the docker images on tag build.
- run:
command: ./.circleci/generate_artifacts.sh ~/artifacts
name: tar/zip up artifacts and make hashes
no_output_timeout: "40m"
- run:
command: |
if [ ! -z "${DDEV_GITHUB_TOKEN}" ]; then
echo "DDEV_GITHUB_TOKEN provided, pushing release ${CIRCLE_TAG}"
ghr \
-prerelease \
-r $CIRCLE_PROJECT_REPONAME \
-u $CIRCLE_PROJECT_USERNAME \
-b "$(cat ./.github/RELEASE_NOTES_TEMPLATE.md)" \
-t $DDEV_GITHUB_TOKEN \
"${CIRCLE_TAG}" ~/artifacts
else
echo "DDEV_GITHUB_TOKEN not provided, not pushing release $CIRCLE_TAG"
fi
name: Upload artifacts to GitHub release page
- store_artifacts:
path: ~/artifacts
name: Artifact storage
- run:
name: "Bump homebrew edge release"
command: ".circleci/bump_homebrew.sh ${HOMEBREW_EDGE_REPOSITORY} ddev ${CIRCLE_TAG} ~/artifacts"
- run:
name: "Bump homebrew main release if necessary"
command: |
if [ ${CIRCLE_TAG%-*} = ${CIRCLE_TAG} ]; then
.circleci/bump_homebrew.sh ${HOMEBREW_STABLE_REPOSITORY} ddev ${CIRCLE_TAG} ~/artifacts
else
echo "Skipping homebrew main release because ${CIRCLE_TAG} is an edge/prerelease"
fi
- run:
name: Push AUR ddev-bin if necessary
command: |
if [ ! -z "${AUR_SSH_PRIVATE_KEY}" ] && [ "${CIRCLE_TAG%-*}" = "${CIRCLE_TAG}" ] ; then
.circleci/bump_aur.sh ddev-bin ${CIRCLE_TAG} ~/artifacts
else
echo "Skipping AUR ddev-bin push"
fi
- run:
name: Push AUR ddev-edge-bin
command: |
if [ ! -z "${AUR_SSH_PRIVATE_KEY}" ] ; then
.circleci/bump_aur.sh ddev-edge-bin ${CIRCLE_TAG} ~/artifacts
else
echo "Skipping AUR ddev-edge-bin push"
fi
- run:
name: Upload chocolatey windows release
command: |
if [ ! -z "${CHOCOLATEY_API_KEY:-}" ]; then
echo "Pushing release to chocolatey..."
pushd .gotmp/bin/windows_amd64/chocolatey
docker run --rm -v $PWD:/tmp/chocolatey -w /tmp/chocolatey linuturk/mono-choco push -s https://push.chocolatey.org/ --api-key "${CHOCOLATEY_API_KEY}"
popd
else
echo "NOT pushing release to chocolatey because no CHOCOLATEY_API_KEY was provided"
fi
workflows:
version: 2
normal_build_and_test:
jobs:
- build
# - mac_container_test
- lx_container_test
# - staticrequired
- lx_nginx_fpm_test:
requires:
- build
# - mac_nginx_fpm_test:
# requires:
# - build
# - mac_apache_fpm_test:
# requires:
# - build
# - mac_nfsmount_test:
# requires:
# - build
- lx_apache_fpm_test:
requires:
- build
# - lx_apache_cgi_test:
# requires:
# - build
- lx_nfsmount_test:
requires:
- build
# - artifacts:
# requires:
# - build
nightly_build:
triggers:
- schedule:
cron: "0 3 * * *"
filters:
branches:
only:
- master
- "pull/[0-9]+"
jobs:
- build
- lx_container_test
- lx_nginx_fpm_test:
requires:
- build
release_build:
jobs:
- release_build:
context: ddev-local
filters:
tags:
only:
- "/.*/"
branches:
ignore: /.*/