forked from apinf/apinf-umbrella
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Taskfile.yml
766 lines (696 loc) · 18.2 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
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
# 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).
# - For colorized output we use the "unbuffer" tool to force color output on
# some commands, since Task doesn't easily support detecting colorized output
# (as of the output changes in 2.0.3):
# https://github.com/go-task/task/issues/136
version: "2"
output: interleaved
tasks:
deps:bundler:
deps:
- deps:rubygems
cmds:
- ./tasks/deps/bundler
sources:
- ./build/work/stamp/deps/rubygems
- ./tasks/deps/bundler
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/deps/bundler
method: checksum
deps:geolitecity:
cmds:
- ./tasks/deps/geolitecity
sources:
- ./tasks/deps/geolitecity
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/deps/geolitecity
method: none
deps:libcidr:
cmds:
- ./tasks/deps/libcidr
sources:
- ./tasks/deps/libcidr
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/deps/libcidr
method: checksum
deps:libestr:
cmds:
- ./tasks/deps/libestr
sources:
- ./tasks/deps/libestr
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/deps/libestr
method: checksum
deps:libfastjson:
cmds:
- ./tasks/deps/libfastjson
sources:
- ./tasks/deps/libfastjson
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/deps/libfastjson
method: checksum
deps:libmaxminddb:
cmds:
- ./tasks/deps/libmaxminddb
sources:
- ./tasks/deps/libmaxminddb
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/deps/libmaxminddb
method: checksum
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
method: checksum
deps:mora:
cmds:
- ./tasks/deps/mora
sources:
- ./tasks/deps/mora
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/deps/mora
method: checksum
deps:openresty:
deps:
- deps:libmaxminddb
cmds:
- ./tasks/deps/openresty
sources:
- ./build/work/stamp/deps/libmaxminddb
- ./tasks/deps/openresty
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/deps/openresty
method: checksum
deps:perp:
cmds:
- ./tasks/deps/perp
sources:
- ./tasks/deps/perp
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/deps/perp
method: checksum
deps:rsyslog:
deps:
- deps:libestr
- deps:libfastjson
cmds:
- ./tasks/deps/rsyslog
sources:
- ./build/work/stamp/deps/libestr
- ./build/work/stamp/deps/libfastjson
- ./tasks/deps/rsyslog
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/deps/rsyslog
method: checksum
deps:ruby:
cmds:
- ./tasks/deps/ruby
sources:
- ./tasks/deps/ruby
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/deps/ruby
method: checksum
deps:rubygems:
deps:
- deps:ruby
cmds:
- ./tasks/deps/rubygems
sources:
- ./build/work/stamp/deps/ruby
- ./tasks/deps/rubygems
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/deps/rubygems
method: checksum
deps:runit_svlogd:
cmds:
- ./tasks/deps/runit_svlogd
sources:
- ./tasks/deps/runit_svlogd
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/deps/runit_svlogd
method: checksum
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
method: checksum
deps:
cmds:
- task: deps:bundler
- task: deps:geolitecity
- task: deps:libcidr
- task: deps:luarocks
- task: deps:mora
- task: deps:openresty
- task: deps:perp
- task: deps:rsyslog
- task: deps:runit_svlogd
- task: deps:trafficserver
build-deps:nodejs:
cmds:
- ./tasks/build-deps/nodejs
sources:
- ./tasks/build-deps/nodejs
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/build-deps/nodejs
method: checksum
build-deps:yarn:
deps:
- build-deps:nodejs
cmds:
- ./tasks/build-deps/yarn
sources:
- ./build/work/stamp/build-deps/nodejs
- ./tasks/build-deps/yarn
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/build-deps/yarn
method: checksum
build-deps:
cmds:
- task: build-deps:yarn
app-deps:admin-ui:yarn:
deps:
- build-deps:yarn
cmds:
- ./tasks/app-deps/admin-ui/yarn
sources:
- ./build/work/stamp/build-deps/yarn
- ./src/api-umbrella/admin-ui/.yarnrc
- ./src/api-umbrella/admin-ui/package.json
- ./src/api-umbrella/admin-ui/yarn.lock
- ./tasks/app-deps/admin-ui/yarn
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app-deps/admin-ui/yarn
method: checksum
app-deps:lua:argparse:
deps:
- deps:luarocks
cmds:
- ./tasks/app-deps/lua/argparse
sources:
- ./build/work/stamp/deps/luarocks
- ./tasks/app-deps/lua/argparse
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app-deps/lua/argparse
method: checksum
app-deps:lua:cmsgpack:
deps:
- deps:luarocks
cmds:
- ./tasks/app-deps/lua/cmsgpack
sources:
- ./build/work/stamp/deps/luarocks
- ./tasks/app-deps/lua/cmsgpack
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app-deps/lua/cmsgpack
method: checksum
app-deps:lua:icu-date:
deps:
- deps:luarocks
cmds:
- ./tasks/app-deps/lua/icu-date
sources:
- ./build/work/stamp/deps/luarocks
- ./tasks/app-deps/lua/icu-date
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app-deps/lua/icu-date
method: checksum
app-deps:lua:inspect:
deps:
- deps:luarocks
cmds:
- ./tasks/app-deps/lua/inspect
sources:
- ./build/work/stamp/deps/luarocks
- ./tasks/app-deps/lua/inspect
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app-deps/lua/inspect
method: checksum
app-deps:lua:libcidr-ffi:
deps:
- deps:libcidr
- deps:luarocks
cmds:
- ./tasks/app-deps/lua/libcidr-ffi
sources:
- ./build/work/stamp/deps/libcidr
- ./build/work/stamp/deps/luarocks
- ./tasks/app-deps/lua/libcidr-ffi
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app-deps/lua/libcidr-ffi
method: checksum
app-deps:lua:luaposix:
deps:
- deps:luarocks
cmds:
- ./tasks/app-deps/lua/luaposix
sources:
- ./build/work/stamp/deps/luarocks
- ./tasks/app-deps/lua/luaposix
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app-deps/lua/luaposix
method: checksum
app-deps:lua:luasocket:
deps:
- deps:luarocks
cmds:
- ./tasks/app-deps/lua/luasocket
sources:
- ./build/work/stamp/deps/luarocks
- ./tasks/app-deps/lua/luasocket
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app-deps/lua/luasocket
method: checksum
app-deps:lua:lustache:
deps:
- deps:luarocks
cmds:
- ./tasks/app-deps/lua/lustache
sources:
- ./build/work/stamp/deps/luarocks
- ./tasks/app-deps/lua/lustache
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app-deps/lua/lustache
method: checksum
app-deps:lua:lyaml:
deps:
- deps:luarocks
cmds:
- ./tasks/app-deps/lua/lyaml
sources:
- ./build/work/stamp/deps/luarocks
- ./tasks/app-deps/lua/lyaml
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app-deps/lua/lyaml
method: checksum
app-deps:lua:penlight:
deps:
- deps:luarocks
cmds:
- ./tasks/app-deps/lua/penlight
sources:
- ./build/work/stamp/deps/luarocks
- ./tasks/app-deps/lua/penlight
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app-deps/lua/penlight
method: checksum
app-deps:lua:resty-auto-ssl:
deps:
- deps:luarocks
cmds:
- ./tasks/app-deps/lua/resty-auto-ssl
sources:
- ./build/work/stamp/deps/luarocks
- ./tasks/app-deps/lua/resty-auto-ssl
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app-deps/lua/resty-auto-ssl
method: checksum
app-deps:lua:resty-http:
deps:
- deps:luarocks
cmds:
- ./tasks/app-deps/lua/resty-http
sources:
- ./build/work/stamp/deps/luarocks
- ./tasks/app-deps/lua/resty-http
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app-deps/lua/resty-http
method: checksum
app-deps:lua:resty-jwt:
deps:
- deps:luarocks
cmds:
- ./tasks/app-deps/lua/resty-jwt
sources:
- ./build/work/stamp/deps/luarocks
- ./tasks/app-deps/lua/resty-jwt
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app-deps/lua/resty-jwt
method: checksum
app-deps:lua:resty-logger-socket:
deps:
- deps:luarocks
cmds:
- ./tasks/app-deps/lua/resty-logger-socket
sources:
- ./build/work/stamp/deps/luarocks
- ./tasks/app-deps/lua/resty-logger-socket
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app-deps/lua/resty-logger-socket
method: checksum
app-deps:lua:resty-shcache:
deps:
- deps:luarocks
cmds:
- ./tasks/app-deps/lua/resty-shcache
sources:
- ./build/work/stamp/deps/luarocks
- ./tasks/app-deps/lua/resty-shcache
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app-deps/lua/resty-shcache
method: checksum
app-deps:lua:resty-txid:
deps:
- deps:luarocks
cmds:
- ./tasks/app-deps/lua/resty-txid
sources:
- ./build/work/stamp/deps/luarocks
- ./tasks/app-deps/lua/resty-txid
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app-deps/lua/resty-txid
method: checksum
app-deps:lua:resty-uuid:
deps:
- deps:luarocks
cmds:
- ./tasks/app-deps/lua/resty-uuid
sources:
- ./build/work/stamp/deps/luarocks
- ./tasks/app-deps/lua/resty-uuid
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app-deps/lua/resty-uuid
method: checksum
app-deps:web-app:bundle:
deps:
- deps:bundler
cmds:
- ./tasks/app-deps/web-app/bundle
sources:
- ./build/work/stamp/deps/bundler
- ./src/api-umbrella/web-app/Gemfile
- ./src/api-umbrella/web-app/Gemfile.lock
- ./tasks/app-deps/web-app/bundle
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app-deps/web-app/bundle
method: checksum
app-deps:
cmds:
- task: app-deps:admin-ui:yarn
- task: app-deps:lua:argparse
- task: app-deps:lua:cmsgpack
- task: app-deps:lua:icu-date
- task: app-deps:lua:inspect
- task: app-deps:lua:libcidr-ffi
- task: app-deps:lua:luaposix
- task: app-deps:lua:luasocket
- task: app-deps:lua:lustache
- task: app-deps:lua:lyaml
- task: app-deps:lua:penlight
- task: app-deps:lua:resty-auto-ssl
- task: app-deps:lua:resty-http
- task: app-deps:lua:resty-jwt
- task: app-deps:lua:resty-logger-socket
- task: app-deps:lua:resty-shcache
- task: app-deps:lua:resty-txid
- task: app-deps:lua:resty-uuid
- task: app-deps:web-app:bundle
app:admin-ui:build:
deps:
- app-deps:admin-ui:yarn
cmds:
- ./tasks/app/admin-ui/build
sources:
- ./build/work/stamp/app-deps/admin-ui/yarn
- ./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
method: checksum
app:core:
deps:
- app:admin-ui:build
- app:web-app:precompile
cmds:
- ./tasks/app/core
sources:
- ./build/work/stamp/app/admin-ui/build
- ./build/work/stamp/app/web-app/precompile
- ./tasks/app/core
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app/core
method: checksum
app:static-site:
deps:
- build-deps:nodejs
- deps:bundler
cmds:
- ./tasks/app/static-site
sources:
- ./build/work/stamp/build-deps/nodejs
- ./build/work/stamp/deps/bundler
- ./tasks/app/static-site
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app/static-site
method: checksum
app:web-app:precompile:
deps:
- build-deps:nodejs
- app-deps:web-app:bundle
cmds:
- ./tasks/app/web-app/precompile
sources:
- ./build/work/stamp/app-deps/web-app/bundle
- ./build/work/stamp/build-deps/nodejs
- ./src/api-umbrella/web-app/app/assets/**/*.css
- ./src/api-umbrella/web-app/app/assets/**/*.erb
- ./src/api-umbrella/web-app/app/assets/**/*.js
- ./src/api-umbrella/web-app/app/assets/**/*.scss
- ./tasks/app/web-app/precompile
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/app/web-app/precompile
method: checksum
app:
cmds:
- task: app:core
- task: app:static-site
all:
cmds:
- task: build-deps
- task: deps
- task: app-deps
- task: app
test-deps:bundle:
deps:
- deps:bundler
cmds:
- ./tasks/test-deps/bundle
sources:
- ./build/work/stamp/deps/bundler
- ./Gemfile
- ./Gemfile.lock
- ./tasks/test-deps/bundle
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/test-deps/bundle
method: checksum
test-deps:lua:luacheck:
deps:
- deps:luarocks
cmds:
- ./tasks/test-deps/lua/luacheck
sources:
- ./build/work/stamp/deps/luarocks
- ./tasks/test-deps/lua/luacheck
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/test-deps/lua/luacheck
method: checksum
test-deps:lua:penlight:
deps:
- deps:luarocks
cmds:
- ./tasks/test-deps/lua/penlight
sources:
- ./build/work/stamp/deps/luarocks
- ./tasks/test-deps/lua/penlight
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/test-deps/lua/penlight
method: checksum
test-deps:mailhog:
cmds:
- ./tasks/test-deps/mailhog
sources:
- ./tasks/test-deps/mailhog
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/test-deps/mailhog
method: checksum
test-deps:mongo-orchestration:
cmds:
- ./tasks/test-deps/mongo-orchestration
sources:
- ./tasks/test-deps/mongo-orchestration
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/test-deps/mongo-orchestration
method: checksum
test-deps:openldap:
cmds:
- ./tasks/test-deps/openldap
sources:
- ./tasks/test-deps/openldap
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/test-deps/openldap
method: checksum
test-deps:shellcheck:
cmds:
- ./tasks/test-deps/shellcheck
sources:
- ./tasks/test-deps/shellcheck
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/test-deps/shellcheck
method: checksum
test-deps:unbound:
cmds:
- ./tasks/test-deps/unbound
sources:
- ./tasks/test-deps/unbound
- ./tasks/helpers.sh
generates:
- ./build/work/stamp/test-deps/unbound
method: checksum
test-deps:
cmds:
- task: test-deps:bundle
- task: test-deps:lua:luacheck
- task: test-deps:lua:penlight
- task: test-deps:mailhog
- task: test-deps:mongo-orchestration
- task: test-deps:openldap
- task: test-deps:shellcheck
- task: test-deps:unbound
lint:js:
deps:
- app-deps:admin-ui:yarn
cmds:
- unbuffer ./tasks/lint/js
lint:lua:
deps:
- test-deps:lua:luacheck
cmds:
- unbuffer ./tasks/lint/lua
lint:resty:
deps:
- test-deps:lua:penlight
cmds:
- unbuffer ./tasks/lint/resty/run
lint:ruby:
deps:
- test-deps:bundle
cmds:
- unbuffer ./tasks/lint/ruby
lint:shell:
deps:
- test-deps:shellcheck
cmds:
- unbuffer ./tasks/lint/shell
lint:
cmds:
- task: lint:js
- task: lint:lua
- task: lint:resty
- task: lint:ruby
- task: lint:shell
outdated:
cmds:
- unbuffer ./tasks/outdated
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