-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
1947 lines (1856 loc) · 51.9 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
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
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
version: 2.1
# Do not change file .circleci/config.yml
# the folder .circleci/pieces has the parts of the script
# go to .git > hooks and create a file called pre-commit
# with this content (without first '#' sign)
# #!/bin/sh
# ./.circleci/assembly.sh
jobs:
workflow_ran:
docker:
- image: cimg/base:current
steps:
- run: echo "Now it can be merged into version branch!"
trufflehog:
docker:
- image: python:3-alpine
steps:
- checkout
- run:
name: install trufflehog
command: apk add --no-cache git && pip install gitdb2==3.0.0 trufflehog
- run:
name: run trufflehog
command: trufflehog --exclude_paths .circleci/trufflehog/exclude-patterns.txt --allow .circleci/trufflehog/allow.json .
test_ci:
docker:
- image: darakeon/ubuntu
resource_class: small
steps:
- checkout
- run:
name: copy old
path: .circleci
command: cp config.yml config_old.yml
- run:
name: assembly
command: ./.circleci/assembly.sh check
- run:
name: compare
path: .circleci
command: if [[ $(diff config.yml config_old.yml) != '' ]]; then echo 'outdated ci config'; exit 1; fi
push_docker_browser:
docker:
- image: docker
steps:
- checkout
- setup_remote_docker:
docker_layer_caching: true
- run:
name: Install make
command: apk add make
- run:
name: Login
command: docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- run:
name: Build images
path: architecture/ci
command: make build_browser PUSH=1
push_docker_android:
docker:
- image: docker
steps:
- checkout
- setup_remote_docker:
docker_layer_caching: true
- run:
name: Install make
command: apk add make
- run:
name: Login
command: docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- run:
name: Build images
path: architecture/ci
command: make build_android PUSH=1
- run:
name: Build images
path: architecture/ci
command: make build_android_publish PUSH=1
push_docker_migrator_ci:
docker:
- image: docker
steps:
- checkout
- setup_remote_docker:
docker_layer_caching: true
- run:
name: Install make
command: apk add make
- run:
name: Login
command: docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- run:
name: Build images
path: architecture/ci
command: make build_migrator PUSH=1
build_core:
docker:
- image: darakeon/netcore
steps:
- checkout
- run:
name: set checksums
command: |
cat core/*/*.csproj > lib_cache_key
CS_CORE=$(md5sum lib_cache_key | cut -d' ' -f1)
cat core/*/*/*.csproj >> tests_cache_key
CS_TEST=$(md5sum tests_cache_key | cut -d' ' -f1)
CORE_CACHE_KEY=$CS_CORE-$CS_TEST
echo $CORE_CACHE_KEY > core/core_cache_key
- restore_cache:
keys:
- dotnet-{{ checksum "core/core_cache_key" }}
- run:
name: dependencies
command: dotnet restore core/Core.sln
- save_cache:
key: dotnet-{{ checksum "core/core_cache_key" }}
paths:
- ~/.nuget/packages
- run:
name: build
command: dotnet build -c Debug core/Core.sln --no-restore
- persist_to_workspace:
root: core
paths:
- core_cache_key
- "*/bin"
- "*/obj"
- "Tests/*/bin"
- "Tests/*/obj"
audit_core:
docker:
- image: darakeon/netcore
steps:
- checkout
- attach_workspace:
at: core
- restore_cache:
keys:
- dotnet-{{ checksum "core/core_cache_key" }}
- run:
path: core
name: check vulnerability
command: |
RESULT=$(dotnet list package --vulnerable --include-transitive | grep 'has no vulnerable')
echo "$RESULT"
NUMBER_OF_PROJECTS=$(cat Core.sln | grep .csproj | wc -l)
CURRENT=$(echo "$RESULT" | wc -l)
if [ $CURRENT != $NUMBER_OF_PROJECTS ]; then
exit 1
fi
test_core_generic:
docker:
- image: darakeon/netcore
steps:
- checkout
- attach_workspace:
at: core
- restore_cache:
keys:
- dotnet-{{ checksum "core/core_cache_key" }}
- run:
path: core/Tests/Generic
name: tests generic
command: dotnet test -v m --no-build
- store_artifacts:
path: outputs/logs/core
destination: logs
test_core_language:
docker:
- image: darakeon/netcore
steps:
- checkout
- attach_workspace:
at: core
- restore_cache:
keys:
- dotnet-{{ checksum "core/core_cache_key" }}
- run:
path: core/Tests/Language
name: tests language
command: dotnet test -v m --no-build
- store_artifacts:
path: outputs/logs/core
destination: logs
test_core_email:
docker:
- image: darakeon/netcore
steps:
- checkout
- attach_workspace:
at: core
- restore_cache:
keys:
- dotnet-{{ checksum "core/core_cache_key" }}
- run:
path: core/Tests/Email
name: tests email
command: dotnet test -v m --no-build
- run:
path: outputs/inbox
name: zip mails
command: zip inbox.zip *.eml && rm *.eml
- store_artifacts:
path: outputs/inbox
- store_artifacts:
path: outputs/logs/core
destination: logs
test_core_exchange:
docker:
- image: darakeon/netcore
steps:
- checkout
- attach_workspace:
at: core
- restore_cache:
keys:
- dotnet-{{ checksum "core/core_cache_key" }}
- run:
path: core/Tests/Exchange
name: tests exchange
command: dotnet test -v m --no-build
- store_artifacts:
path: outputs/logs/core
destination: logs
test_core_entities:
docker:
- image: darakeon/netcore
steps:
- checkout
- attach_workspace:
at: core
- restore_cache:
keys:
- dotnet-{{ checksum "core/core_cache_key" }}
- run:
path: core/Tests/Entities
name: tests entities
command: dotnet test -v m --no-build
- store_artifacts:
path: outputs/logs/core
destination: logs
test_core_business_logic_auth:
docker:
- image: darakeon/netcore
resource_class: large
steps:
- checkout
- attach_workspace:
at: core
- restore_cache:
keys:
- dotnet-{{ checksum "core/core_cache_key" }}
- run:
path: core/Tests/BusinessLogic
name: tests business logic
command: dotnet test -v m --no-build --filter FullyQualifiedName~A_Auth
- run:
path: outputs/inbox
name: zip mails
command: zip inbox.zip *.eml && rm *.eml
- store_artifacts:
path: outputs/inbox
- store_artifacts:
path: outputs/logs/core
destination: logs
test_core_business_logic_law:
docker:
- image: darakeon/netcore
resource_class: large
steps:
- checkout
- attach_workspace:
at: core
- restore_cache:
keys:
- dotnet-{{ checksum "core/core_cache_key" }}
- run:
path: core/Tests/BusinessLogic
name: tests business logic
command: dotnet test -v m --no-build --filter FullyQualifiedName~B_Law
- run:
path: outputs/inbox
name: zip mails
command: zip inbox.zip *.eml && rm *.eml
- store_artifacts:
path: outputs/inbox
- store_artifacts:
path: outputs/logs/core
destination: logs
test_core_business_logic_admin:
docker:
- image: darakeon/netcore
resource_class: large
steps:
- checkout
- attach_workspace:
at: core
- restore_cache:
keys:
- dotnet-{{ checksum "core/core_cache_key" }}
- run:
path: core/Tests/BusinessLogic
name: tests business logic
command: dotnet test -v m --no-build --filter FullyQualifiedName~C_Admin
- run:
path: outputs/inbox
name: zip mails
command: zip inbox.zip *.eml && rm *.eml
- store_artifacts:
path: outputs/inbox
- store_artifacts:
path: outputs/logs/core
destination: logs
test_core_business_logic_clip:
docker:
- image: darakeon/netcore
resource_class: large
steps:
- checkout
- attach_workspace:
at: core
- restore_cache:
keys:
- dotnet-{{ checksum "core/core_cache_key" }}
- run:
path: core/Tests/BusinessLogic
name: tests business logic
command: dotnet test -v m --no-build --filter FullyQualifiedName~D_Clip
- run:
path: outputs/inbox
name: zip mails
command: zip inbox.zip *.eml && rm *.eml
- store_artifacts:
path: outputs/inbox
- store_artifacts:
path: outputs/logs/core
destination: logs
test_core_business_logic_money:
docker:
- image: darakeon/netcore
resource_class: large
steps:
- checkout
- attach_workspace:
at: core
- restore_cache:
keys:
- dotnet-{{ checksum "core/core_cache_key" }}
- run:
path: core/Tests/BusinessLogic
name: tests business logic
command: dotnet test -v m --no-build --filter FullyQualifiedName~E_Money
- run:
path: outputs/inbox
name: zip mails
command: zip inbox.zip *.eml && rm *.eml
- store_artifacts:
path: outputs/inbox
- store_artifacts:
path: outputs/logs/core
destination: logs
test_core_business_logic_report:
docker:
- image: darakeon/netcore
resource_class: large
steps:
- checkout
- attach_workspace:
at: core
- restore_cache:
keys:
- dotnet-{{ checksum "core/core_cache_key" }}
- run:
path: core/Tests/BusinessLogic
name: tests business logic
command: dotnet test -v m --no-build --filter FullyQualifiedName~F_Report
- run:
path: outputs/inbox
name: zip mails
command: zip inbox.zip *.eml && rm *.eml
- store_artifacts:
path: outputs/inbox
- store_artifacts:
path: outputs/logs/core
destination: logs
test_core_business_logic_outside:
docker:
- image: darakeon/netcore
resource_class: large
steps:
- checkout
- attach_workspace:
at: core
- restore_cache:
keys:
- dotnet-{{ checksum "core/core_cache_key" }}
- run:
path: core/Tests/BusinessLogic
name: tests business logic
command: dotnet test -v m --no-build --filter FullyQualifiedName~G_Outside
- run:
path: outputs/inbox
name: zip mails
command: zip inbox.zip *.eml && rm *.eml
- store_artifacts:
path: outputs/inbox
- store_artifacts:
path: outputs/logs/core
destination: logs
test_core_business_logic_attendant:
docker:
- image: darakeon/netcore
resource_class: large
steps:
- checkout
- attach_workspace:
at: core
- restore_cache:
keys:
- dotnet-{{ checksum "core/core_cache_key" }}
- run:
path: core/Tests/BusinessLogic
name: tests business logic
command: dotnet test -v m --no-build --filter FullyQualifiedName~H_Attendant
- run:
path: outputs/inbox
name: zip mails
command: zip inbox.zip *.eml && rm *.eml
- store_artifacts:
path: outputs/inbox
- store_artifacts:
path: outputs/s3
- store_artifacts:
path: outputs/logs/core
destination: logs
test_core_business_logic_executor:
docker:
- image: darakeon/netcore
resource_class: large
steps:
- checkout
- attach_workspace:
at: core
- restore_cache:
keys:
- dotnet-{{ checksum "core/core_cache_key" }}
- run:
path: core/Tests/BusinessLogic
name: tests business logic
command: dotnet test -v m --no-build --filter FullyQualifiedName~I_Executor
- run:
path: outputs/inbox
name: zip mails
command: zip inbox.zip *.eml && rm *.eml
- store_artifacts:
path: outputs/inbox
- store_artifacts:
path: outputs/s3
- store_artifacts:
path: outputs/logs/core
destination: logs
build_site:
docker:
- image: darakeon/netcore
steps:
- checkout
- attach_workspace:
at: core
- run:
name: set checksums
command: |
cat core/*/*.csproj > core_cache_key
CS_CORE=$(md5sum core_cache_key | cut -d' ' -f1)
CS_MVC_=$(md5sum site/MVC/MVC.csproj | cut -d' ' -f1)
CS_TMVC=$(md5sum site/Tests/MVC/MVC.Tests.csproj | cut -d' ' -f1)
SITE_CACHE_KEY=$CS_CORE-$CS_MVC_-$CS_TMVC
echo $SITE_CACHE_KEY > site/site_cache_key
- restore_cache:
keys:
- dotnet-{{ checksum "site/site_cache_key" }}
- run:
name: dependencies
command: dotnet restore site/Site.sln
- save_cache:
key: dotnet-{{ checksum "site/site_cache_key" }}
paths:
- ~/.nuget/packages
- run:
name: build
command: dotnet build -c Debug site/Site.sln --no-restore
- persist_to_workspace:
root: site
paths:
- site_cache_key
- MVC/bin
- MVC/obj
- Tests/MVC/bin
- Tests/MVC/obj
audit_site:
docker:
- image: darakeon/netcore
steps:
- checkout
- attach_workspace:
at: core
- attach_workspace:
at: site
- restore_cache:
keys:
- dotnet-{{ checksum "site/site_cache_key" }}
- run:
path: site
name: check vulnerability
command: |
RESULT=$(dotnet list package --vulnerable --include-transitive | grep 'has no vulnerable')
echo "$RESULT"
NUMBER_OF_PROJECTS=$(cat Site.sln | grep .csproj | wc -l)
CURRENT=$(echo "$RESULT" | wc -l)
if [ $CURRENT != $NUMBER_OF_PROJECTS ]; then
exit 1
fi
test_site:
docker:
- image: darakeon/netcore
steps:
- checkout
- attach_workspace:
at: site
- restore_cache:
keys:
- dotnet-{{ checksum "site/site_cache_key" }}
- run:
path: site/Tests/MVC
name: tests mvc
command: dotnet test -v m --no-build
- store_artifacts:
path: outputs/inbox
- store_artifacts:
path: site/Tests/log
destination: log
audit_test_browser:
docker:
- image: darakeon/dfm-browser-tests
steps:
- checkout
- attach_workspace:
at: ./
- restore_cache:
keys:
- node-{{ checksum "site/Tests/Browser/package.json" }}-{{ checksum "site/Tests/Browser/package-lock.json" }}
- run:
name: dependencies node
path: site/Tests/Browser
command: npm install
- save_cache:
key: node-{{ checksum "site/Tests/Browser/package.json" }}-{{ checksum "site/Tests/Browser/package-lock.json" }}
paths:
- site/Tests/Browser/node_modules
- run:
name: check_dependencies node
path: site/Tests/Browser
command: npm audit
- store_artifacts:
path: /root/.npm/_logs/
- store_artifacts:
path: /root/.npm/eresolve-report.txt
test_browser:
docker:
- image: darakeon/dfm-browser-tests
steps:
- checkout
- attach_workspace:
at: core
- attach_workspace:
at: site
- restore_cache:
keys:
- dotnet-{{ checksum "site/site_cache_key" }}
- restore_cache:
keys:
- dotnet-libman-{{ checksum "site/MVC/libman.json" }}
- run:
name: dependencies client
path: site/MVC
command: libman restore
- save_cache:
key: dotnet-libman-{{ checksum "site/MVC/libman.json" }}
paths:
- site/MVC/Assets/libs
- run:
name: publish site
path: site/MVC
command: dotnet publish -c Release MVC.csproj -o ../Tests/Browser/server --no-restore
- restore_cache:
keys:
- node-{{ checksum "site/Tests/Browser/package.json" }}-{{ checksum "site/Tests/Browser/package-lock.json" }}
- run:
name: tests browser
command: .circleci/browser/run-tests.sh
- store_artifacts:
path: site/Tests/Browser/log
- store_artifacts:
path: site/Tests/Browser/server/tests.db
- store_artifacts:
path: outputs/inbox
- store_artifacts:
path: outputs/s3
build_api:
docker:
- image: darakeon/netcore
steps:
- checkout
- attach_workspace:
at: core
- run:
name: set checksums
command: |
cat core/*/*.csproj > core_cache_key
CS_CORE=$(md5sum core_cache_key | cut -d' ' -f1)
CS_API_=$(md5sum api/API/API.csproj | cut -d' ' -f1)
CS_TAPI=$(md5sum api/Tests/API/API.Tests.csproj | cut -d' ' -f1)
API_CACHE_KEY=$CS_CORE-$CS_API_-$CS_TAPI
echo $API_CACHE_KEY > api/api_cache_key
- restore_cache:
keys:
- dotnet-{{ checksum "api/api_cache_key" }}
- run:
name: dependencies
command: dotnet restore api/API.sln
- save_cache:
key: dotnet-{{ checksum "api/api_cache_key" }}
paths:
- ~/.nuget/packages
- run:
name: build
command: dotnet build -c Debug api/API.sln --no-restore
- persist_to_workspace:
root: api
paths:
- api_cache_key
- API/bin
- API/obj
- Tests/API/bin
- Tests/API/obj
audit_api:
docker:
- image: darakeon/netcore
steps:
- checkout
- attach_workspace:
at: core
- attach_workspace:
at: api
- restore_cache:
keys:
- dotnet-{{ checksum "api/api_cache_key" }}
- run:
path: api
name: check vulnerability
command: |
RESULT=$(dotnet list package --vulnerable --include-transitive | grep 'has no vulnerable')
echo "$RESULT"
NUMBER_OF_PROJECTS=$(cat API.sln | grep .csproj | wc -l)
CURRENT=$(echo "$RESULT" | wc -l)
if [ $CURRENT != $NUMBER_OF_PROJECTS ]; then
exit 1
fi
test_api:
docker:
- image: darakeon/netcore
steps:
- checkout
- attach_workspace:
at: api
- restore_cache:
keys:
- dotnet-{{ checksum "api/api_cache_key" }}
- run:
path: api/Tests/API
name: tests api
command: dotnet test -v m --no-build
- store_artifacts:
path: outputs/inbox
- store_artifacts:
path: api/Tests/log
destination: log
build_android:
docker:
- image: darakeon/android
resource_class: large
steps:
- checkout
- run:
name: create empty credentials file
path: android
command: echo "storeFile=\nstorePassword=\nkeyAlias=\nkeyPassword=" > keystore.properties
- run:
name: set checksums
command: |
KT_DOCK=$(md5sum architecture/ci/android.dockerfile | cut -d' ' -f1)
KT_MAIN=$(md5sum android/build.gradle | cut -d' ' -f1)
KT_UTIL=$(md5sum android/TestUtils/build.gradle | cut -d' ' -f1)
KT_LIBR=$(md5sum android/Lib/build.gradle | cut -d' ' -f1)
KT_APPL=$(md5sum android/App/build.gradle | cut -d' ' -f1)
KT_ERRO=$(md5sum android/ErrorLogs/build.gradle | cut -d' ' -f1)
ANDROID_CACHE_KEY=$KT_DOCK-$KT_MAIN-$KT_UTIL-$KT_LIBR-$KT_APPL-$KT_ERRO
echo $ANDROID_CACHE_KEY > android/android_cache_key
- restore_cache:
keys:
- kotlin-{{ checksum "android/android_cache_key" }}
- run:
name: project dependencies
path: android
command: gradle-with-metadata --no-daemon androidDependencies
- save_cache:
key: kotlin-{{ checksum "android/android_cache_key" }}
paths:
- /var/cache/gradle
- /root/.m2/repository
- run:
name: build
path: android
command: gradle-with-metadata --no-daemon build -x test -x androidDependencies -x packageRelease -x packageDebug
- run:
name: configure
path: android
command: gradle-with-metadata --no-daemon configure
- store_artifacts:
path: android/build/reports
destination: reports/main
- store_artifacts:
path: android/TestUtils/build/reports
destination: reports/testUtils
- store_artifacts:
path: android/Lib/build/reports
destination: reports/lib
- store_artifacts:
path: android/App/build/reports
destination: reports/app
- store_artifacts:
path: android/ErrorLogs/build/reports
destination: reports/errorLogs
- store_artifacts:
path: android/gradle/verification-metadata.xml
destination: verification-metadata.xml
- persist_to_workspace:
root: android
paths:
- android_cache_key
- keystore.properties
- build
- Lib/build
- App/build
- ErrorLogs/build
- TestUtils/build
audit_android:
docker:
- image: darakeon/android
steps:
- checkout
- attach_workspace:
at: android
- restore_cache:
keys:
- kotlin-{{ checksum "android/android_cache_key" }}
- run:
name: check vulnerability
path: android
command: gradle dependencyCheckAnalyze
test_android_lib_debug:
docker:
- image: darakeon/android
resource_class: large
steps:
- checkout
- attach_workspace:
at: android
- restore_cache:
keys:
- kotlin-{{ checksum "android/android_cache_key" }}
- run:
name: tests lib debug
path: android
command: gradle-with-metadata :Lib:testDebugUnitTest -x androidDependencies -x build -x packageRelease -x packageDebug
- store_artifacts:
path: outputs/logs/android
destination: logs
- store_artifacts:
path: android/gradle/verification-metadata.xml
destination: verification-metadata.xml
- store_test_results:
path: android/Lib/build/test-results
test_android_lib_release:
docker:
- image: darakeon/android
resource_class: large
steps:
- checkout
- attach_workspace:
at: android
- restore_cache:
keys:
- kotlin-{{ checksum "android/android_cache_key" }}
- run:
name: tests lib release
path: android
command: gradle-with-metadata :Lib:testReleaseUnitTest -x androidDependencies -x build -x packageRelease -x packageDebug
- store_artifacts:
path: outputs/logs/android
destination: logs
- store_artifacts:
path: android/gradle/verification-metadata.xml
destination: verification-metadata.xml
- store_test_results:
path: android/Lib/build/test-results
test_android_app_debug:
docker:
- image: darakeon/android
resource_class: large
steps:
- checkout
- attach_workspace:
at: android
- restore_cache:
keys:
- kotlin-{{ checksum "android/android_cache_key" }}
- run:
name: tests app debug
path: android
command: gradle-with-metadata :App:testDebugUnitTest -x androidDependencies -x build -x packageRelease -x packageDebug
- store_artifacts:
path: outputs/logs/android
destination: logs
- store_artifacts:
path: android/gradle/verification-metadata.xml
destination: verification-metadata.xml
- store_test_results:
path: android/App/build/test-results
test_android_app_release:
docker:
- image: darakeon/android
resource_class: large
steps:
- checkout
- attach_workspace:
at: android
- restore_cache:
keys:
- kotlin-{{ checksum "android/android_cache_key" }}
- run:
name: tests app release
path: android
command: gradle-with-metadata :App:testReleaseUnitTest -x androidDependencies -x build -x packageRelease -x packageDebug
- store_artifacts:
path: outputs/logs/android
destination: logs
- store_artifacts:
path: android/gradle/verification-metadata.xml
destination: verification-metadata.xml
- store_test_results:
path: android/App/build/test-results
build_robot:
docker:
- image: darakeon/netcore
resource_class: small
environment:
ASPNETCORE_ENVIRONMENT: circleCI
steps:
- checkout
- attach_workspace:
at: core
- run:
name: set checksums
command: |
cat core/*/*.csproj > core_cache_key
CS_CORE=$(md5sum core_cache_key | cut -d' ' -f1)
CS_ROBT=$(md5sum robot/Robot/Robot.csproj | cut -d' ' -f1)
ROBOT_CACHE_KEY=$CS_CORE-$CS_ROBT
echo $ROBOT_CACHE_KEY > robot/robot_cache_key
- restore_cache:
keys:
- dotnet-{{ checksum "robot/robot_cache_key" }}
- run:
name: dependencies
command: dotnet restore robot/Robot.sln
- save_cache:
key: dotnet-{{ checksum "robot/robot_cache_key" }}
paths:
- ~/.nuget/packages
- run:
name: build
path: robot
command: dotnet build -c Release Robot.sln --no-restore
- persist_to_workspace:
root: robot
paths:
- robot_cache_key
- Robot/bin
- Robot/obj
audit_robot:
docker:
- image: darakeon/netcore
resource_class: small
environment:
ASPNETCORE_ENVIRONMENT: circleCI
steps:
- checkout
- attach_workspace:
at: core
- attach_workspace:
at: robot
- restore_cache:
keys:
- dotnet-{{ checksum "robot/robot_cache_key" }}
- run:
path: robot
name: check vulnerability
command: |
RESULT=$(dotnet list package --vulnerable --include-transitive | grep 'has no vulnerable')
echo "$RESULT"
NUMBER_OF_PROJECTS=$(cat Robot.sln | grep .csproj | wc -l)
CURRENT=$(echo "$RESULT" | wc -l)
if [ $CURRENT != $NUMBER_OF_PROJECTS ]; then
exit 1
fi
check_robot:
docker:
- image: darakeon/netcore
resource_class: small
environment:
ASPNETCORE_ENVIRONMENT: circleCI
steps:
- checkout
- attach_workspace:
at: robot
- restore_cache: