-
Notifications
You must be signed in to change notification settings - Fork 325
/
Taskfile.yml
467 lines (416 loc) · 11 KB
/
Taskfile.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
# Run build tasks, test tasks, and other generic tasks via the go-task tool:
# https://github.com/go-task/task
#
# The primary reason we're using this over something more standard like Make is
# that it provides a simple mechanism to skip tasks based on file checksums.
# This lets us more easily cache and skip steps in the CI and Docker
# development environment (since we only need to cache the build output and
# checksum files, rather than also needing to cache all the intermediate build
# files).
#
# A few general notes on the approach:
#
# - We mostly defer each task to a shell script to do the actual work.
# - For the build process, we use "stamp" files as outputs and also use those
# within the dependency chain. We use these stamp files so that the
# checksumming approach properly invalidates the entire chain of dependencies
# when build files change (whereas just using "deps" in go-task doesn't fully
# work for multiple levels of dependencies). So, for example, if the
# libmaxminddb dependency changes, rebuilding it properly cascades and
# triggers a rebuild of openresty (1st level dependency) and luarocks (2nd
# level dependency).
version: "3"
output: interleaved
run: when_changed
tasks:
deps:cue:
cmds:
- ./tasks/deps/cue
sources:
- ./tasks/deps/cue
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/deps/cue
deps:envoy:
deps:
- build-deps:crane
cmds:
- ./tasks/deps/envoy
sources:
- ./build/work/stamp/build-deps/crane
- ./tasks/deps/envoy
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/deps/envoy
deps:envoy-control-plane:
deps:
- build-deps:crane
cmds:
- ./tasks/deps/envoy-control-plane
sources:
- ./build/work/stamp/build-deps/crane
- ./tasks/deps/envoy-control-plane
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/deps/envoy-control-plane
deps:fluent-bit:
cmds:
- ./tasks/deps/fluent-bit
sources:
- ./tasks/deps/fluent-bit
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/deps/fluent-bit
deps:luarocks:
deps:
- deps:openresty
cmds:
- ./tasks/deps/luarocks
sources:
- ./build/work/stamp/deps/openresty
- ./tasks/deps/luarocks
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/deps/luarocks
deps:openresty:
cmds:
- ./tasks/deps/openresty
sources:
- ./tasks/deps/openresty
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/deps/openresty
deps:perp:
cmds:
- ./tasks/deps/perp
sources:
- ./tasks/deps/perp
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/deps/perp
deps:trafficserver:
deps:
- deps:openresty
cmds:
- ./tasks/deps/trafficserver
sources:
- ./build/work/stamp/deps/openresty
- ./tasks/deps/trafficserver
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/deps/trafficserver
deps:
cmds:
- task: deps:cue
- task: deps:envoy
- task: deps:envoy-control-plane
- task: deps:fluent-bit
- task: deps:luarocks
- task: deps:openresty
- task: deps:perp
- task: deps:trafficserver
build-deps:crane:
cmds:
- ./tasks/build-deps/crane
sources:
- ./tasks/build-deps/crane
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/build-deps/crane
build-deps:hugo:
cmds:
- ./tasks/build-deps/hugo
sources:
- ./tasks/build-deps/hugo
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/build-deps/hugo
build-deps:nodejs:
cmds:
- ./tasks/build-deps/nodejs
sources:
- ./tasks/build-deps/nodejs
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/build-deps/nodejs
build-deps:pnpm:
deps:
- build-deps:nodejs
cmds:
- ./tasks/build-deps/pnpm
sources:
- ./build/work/stamp/build-deps/nodejs
- ./tasks/build-deps/pnpm
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/build-deps/pnpm
build-deps:
cmds:
- task: build-deps:crane
- task: build-deps:hugo
- task: build-deps:pnpm
app-deps:admin-ui:pnpm:
deps:
- build-deps:pnpm
cmds:
- ./tasks/app-deps/admin-ui/pnpm
sources:
- ./build/work/stamp/build-deps/pnpm
- ./src/api-umbrella/admin-ui/package.json
- ./src/api-umbrella/admin-ui/pnpm-lock.yaml
- ./tasks/app-deps/admin-ui/pnpm
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app-deps/admin-ui/pnpm
app-deps:example-website:pnpm:
deps:
- build-deps:pnpm
cmds:
- ./tasks/app-deps/example-website/pnpm
sources:
- ./build/work/stamp/build-deps/pnpm
- ./src/api-umbrella/example-website/package.json
- ./src/api-umbrella/example-website/pnpm-lock.yaml
- ./tasks/app-deps/example-website/pnpm
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app-deps/example-website/pnpm
app-deps:luarocks:
deps:
- deps:luarocks
cmds:
- ./tasks/app-deps/luarocks
sources:
- ./build/work/stamp/deps/luarocks
- ./src/api-umbrella-git-1.rockspec
- ./src/luarocks.lock
- ./tasks/app-deps/luarocks
- ./tasks/helpers.sh
- ./tasks/helpers/lua.sh
generates:
- ./build/work/stamp/app-deps/luarocks
app-deps:web-app:pnpm:
deps:
- build-deps:pnpm
cmds:
- ./tasks/app-deps/web-app/pnpm
sources:
- ./build/work/stamp/build-deps/pnpm
- ./src/api-umbrella/web-app/package.json
- ./src/api-umbrella/web-app/pnpm-lock.yaml
- ./tasks/app-deps/web-app/pnpm
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app-deps/web-app/pnpm
app-deps:
cmds:
- task: app-deps:admin-ui:pnpm
- task: app-deps:example-website:pnpm
- task: app-deps:luarocks
- task: app-deps:web-app:pnpm
app:admin-ui:build:
deps:
- app-deps:admin-ui:pnpm
cmds:
- ./tasks/app/admin-ui/build
sources:
- ./build/work/stamp/app-deps/admin-ui/pnpm
- ./src/api-umbrella/admin-ui/app/**/*.hbs
- ./src/api-umbrella/admin-ui/app/**/*.html
- ./src/api-umbrella/admin-ui/app/**/*.js
- ./src/api-umbrella/admin-ui/app/**/*.scss
- ./src/api-umbrella/admin-ui/config/**/*.js
- ./src/api-umbrella/admin-ui/ember-cli-build.js
- ./src/api-umbrella/admin-ui/lib/**/*.js
- ./tasks/app/admin-ui/build
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app/admin-ui/build
app:core:
deps:
- app:admin-ui:build
- app:example-website:build
- app:locale
- app:web-app:precompile
cmds:
- ./tasks/app/core
sources:
- ./build/work/stamp/app/admin-ui/build
- ./build/work/stamp/app/example-website/build
- ./build/work/stamp/app/locale
- ./build/work/stamp/app/web-app/precompile
- ./tasks/app/core
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app/core
app:example-website:build:
deps:
- app-deps:example-website:pnpm
cmds:
- ./tasks/app/example-website/build
sources:
- ./build/work/stamp/app-deps/example-website/pnpm
- ./src/api-umbrella/example-website/config.yaml
- ./src/api-umbrella/example-website/assets/**/*
- ./src/api-umbrella/example-website/content/**/*
- ./src/api-umbrella/example-website/layouts/**/*
- ./tasks/app/example-website/build
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app/example-website/build
app:locale:
deps:
- app-deps:admin-ui:pnpm
cmds:
- ./tasks/app/locale
sources:
- ./build/work/stamp/app-deps/admin-ui/pnpm
- ./locale/*.po
- ./tasks/app/locale
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app/locale
method: checksum
app:web-app:precompile:
deps:
- app-deps:web-app:pnpm
cmds:
- ./tasks/app/web-app/precompile
sources:
- ./build/work/stamp/app-deps/web-app/pnpm
- ./src/api-umbrella/web-app/assets/**/*.scss
- ./src/api-umbrella/web-app/webpack.config.js
- ./tasks/app/web-app/precompile
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app/web-app/precompile
app:
cmds:
- task: app:core
all:
cmds:
- task: build-deps
- task: deps
- task: app-deps
- task: app
test-deps:bundle:
cmds:
- ./tasks/test-deps/bundle
sources:
- ./Gemfile
- ./Gemfile.lock
- ./tasks/test-deps/bundle
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/test-deps/bundle
test-deps:glauth:
cmds:
- ./tasks/test-deps/glauth
sources:
- ./tasks/test-deps/glauth
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/test-deps/glauth
test-deps:luarocks:
deps:
- deps:luarocks
cmds:
- ./tasks/test-deps/luarocks
sources:
- ./build/work/stamp/deps/luarocks
- ./test/api-umbrella-git-1.rockspec
- ./test/luarocks.lock
- ./tasks/test-deps/luarocks
- ./tasks/helpers.sh
- ./tasks/helpers/lua.sh
generates:
- ./build/work/stamp/test-deps/luarocks
test-deps:mailpit:
cmds:
- ./tasks/test-deps/mailpit
sources:
- ./tasks/test-deps/mailpit
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/test-deps/mailpit
test-deps:shellcheck:
cmds:
- ./tasks/test-deps/shellcheck
sources:
- ./tasks/test-deps/shellcheck
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/test-deps/shellcheck
test-deps:
cmds:
- task: test-deps:bundle
- task: test-deps:glauth
- task: test-deps:luarocks
- task: test-deps:mailpit
- task: test-deps:shellcheck
lint:js:
deps:
- app-deps:admin-ui:pnpm
- app-deps:example-website:pnpm
- app-deps:web-app:pnpm
cmds:
- ./tasks/lint/js
lint:lua:
deps:
- test-deps:luarocks
cmds:
- ./tasks/lint/lua
lint:resty:
deps:
- test-deps:luarocks
cmds:
- ./tasks/lint/resty/run
lint:ruby:
deps:
- test-deps:bundle
cmds:
- ./tasks/lint/ruby
lint:shell:
deps:
- test-deps:shellcheck
cmds:
- ./tasks/lint/shell
lint:
cmds:
- task: lint:js
- task: lint:lua
- task: lint:resty
- task: lint:ruby
- task: lint:shell
update:luarocks:
cmds:
- ./tasks/update/luarocks
update:test-deps:luarocks:
cmds:
- ./tasks/update/test-deps/luarocks
outdated:
cmds:
- ./tasks/helpers/test-bundle-exec thor outdated:all
test:
cmds:
- task: all
- task: test-deps
- ./tasks/helpers/test-bundle-exec thor test:test
clean:dev:
cmds:
- ./tasks/clean/dev
distclean:
cmds:
- ./tasks/distclean
install:
cmds:
- ./tasks/install
package:
cmds:
- ./tasks/package
install-system-build-dependencies:
cmds:
- ./tasks/install-system-build-dependencies
default:
cmds:
- task: all