@@ -28,14 +28,29 @@ aliases:
28
28
$filePathWithQuotes = '"{0}"' -f $filePath
29
29
& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86\signtool.exe" sign /a /sm /n "Redis Labs Inc." /fd sha256 /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /v $FilePathWithQuotes
30
30
shell : powershell.exe
31
- scan : &scan
31
+ fileScan : &fileScan
32
32
run :
33
- name : Virustotal scan
34
- command : &virusscan |
33
+ name : Virustotal file scan
34
+ command : &virusfilescan |
35
35
uploadUrl=$(curl -sq -XGET https://www.virustotal.com/api/v3/files/upload_url -H "x-apikey : $VIRUSTOTAL_API_KEY" | jq -r '.data')
36
36
uploadFile=$("/usr/bin/find" /tmp/release -name ${FILE_NAME})
37
37
echo "File to upload : ${uploadFile}"
38
38
analysedId=$(curl -sq -XPOST "${uploadUrl}" -H "x-apikey : $VIRUSTOTAL_API_KEY" --form file=@"${uploadFile}" | jq -r '.data.id')
39
+ if [ $analysedId == "null" ]; then
40
+ echo 'Status is null, something went wrong'; exit 1;
41
+ fi
42
+ echo "export ANALYZED_ID=${analysedId}" >> $BASH_ENV
43
+ echo "Virustotal Analyzed id : ${analysedId}"
44
+ sleep 10
45
+ shell : /bin/bash
46
+ urlScan : &urlScan
47
+ run :
48
+ name : Virustotal url scan
49
+ command : &virusurlscan |
50
+ echo "Url to check : ${URL}"
51
+
52
+ analysedId=$(curl -sq -XPOST https://www.virustotal.com/api/v3/urls -H "x-apikey : $VIRUSTOTAL_API_KEY" --form url=${URL} | jq -r '.data.id')
53
+
39
54
if [ $analysedId == "null" ]; then
40
55
echo 'Status is null, something went wrong'; exit 1;
41
56
fi
@@ -76,13 +91,32 @@ aliases:
76
91
echo "Results:"
77
92
echo "analazedHarmless : ${analazedHarmless}, analazedMalicious: ${analazedMalicious}, analazedSuspicious: ${analazedSuspicious}"
78
93
79
- if [ "$analazedHarmless" != "0" ] || [ "$analazedMalicious" != "0" ] || [ "$analazedSuspicious" != "0" ]; then
80
- echo 'Found dangers'; exit 1;
94
+ if [ "$analazedMalicious" != "0" ] || [ "$analazedSuspicious" != "0" ]; then
95
+ echo "export VIRUS_CHECK_FAILED=true" >> $BASH_ENV
96
+ echo 'Found dangers'; exit 0;
81
97
fi
82
98
99
+ echo "export VIRUS_CHECK_FAILED=false" >> $BASH_ENV
100
+ echo "export SKIP_VIRUSTOTAL_REPORT=true" >> $BASH_ENV
83
101
echo 'Passed';
84
102
shell : /bin/bash
85
103
no_output_timeout : 15m
104
+ virustotalReport : &virustotalReport
105
+ run :
106
+ name : Virustotal slack report
107
+ command : &virusreport |
108
+ if [ "$SKIP_VIRUSTOTAL_REPORT" == "true" ]; then
109
+ exit 0;
110
+ fi
111
+
112
+ FILE_NAME=virustotal.report.json
113
+ BUILD_NAME=$BUILD_NAME FILE_NAME=$FILE_NAME VIRUS_CHECK_FAILED=$VIRUS_CHECK_FAILED node .circleci/virustotal-report.js &&
114
+ curl -H "Content-type : application/json" --data @$FILE_NAME -H "Authorization: Bearer ${SLACK_TEST_REPORT_KEY}" -X POST https://slack.com/api/chat.postMessage
115
+
116
+ if [ "$VIRUS_CHECK_FAILED" == "true" ]; then
117
+ echo 'Found dangers'; exit 1;
118
+ fi
119
+ shell : /bin/bash
86
120
iTestsNames : &iTestsNames
87
121
- oss-st-5 # OSS Standalone v5
88
122
- oss-st-5-pass # OSS Standalone v5 with admin pass required
@@ -91,7 +125,7 @@ aliases:
91
125
- mods-preview # OSS Standalone and all preview modules
92
126
- oss-st-6-tls # OSS Standalone v6 with TLS enabled
93
127
- oss-st-6-tls-auth # OSS Standalone v6 with TLS auth required
94
- - oss-st-6-tls-auth-ssh # OSS Standalone v6 with TLS auth required through ssh
128
+ # - oss-st-6-tls-auth-ssh # OSS Standalone v6 with TLS auth required through ssh
95
129
- oss-clu # OSS Cluster
96
130
- oss-clu-tls # OSS Cluster with TLS enabled
97
131
- oss-sent # OSS Sentinel
@@ -565,7 +599,8 @@ jobs:
565
599
- release/redisstack
566
600
macosx :
567
601
macos :
568
- xcode : 14.2.0
602
+ xcode : 14.3.0
603
+ resource_class : macos.x86.medium.gen2
569
604
parameters :
570
605
env :
571
606
description : Build environment (stage || prod)
@@ -611,6 +646,7 @@ jobs:
611
646
612
647
UPGRADES_LINK='' SEGMENT_WRITE_KEY='' yarn package:stage && yarn package:mas
613
648
rm -rf release/mac
649
+ mv release/mas-universal/RedisInsight-mac-universal-mas.pkg release/RedisInsight-mac-universal-mas.pkg
614
650
no_output_timeout : 60m
615
651
616
652
- run :
@@ -624,7 +660,7 @@ jobs:
624
660
- release/RedisInsight*.zip
625
661
- release/RedisInsight*.dmg
626
662
- release/RedisInsight*.dmg.blockmap
627
- - release/**/ *.pkg
663
+ - release/RedisInsight *.pkg
628
664
- release/*-mac.yml
629
665
- release/redisstack
630
666
windows :
@@ -673,7 +709,7 @@ jobs:
673
709
- release/RedisInsight*.exe
674
710
- release/RedisInsight*.exe.blockmap
675
711
- release/*.yml
676
- virustotal :
712
+ virustotal-file :
677
713
executor : linux-executor
678
714
parameters :
679
715
ext :
@@ -687,8 +723,35 @@ jobs:
687
723
name : export FILE_NAME environment variable
688
724
command : |
689
725
echo 'export FILE_NAME="RedisInsight*<< parameters.ext >>"' >> $BASH_ENV
690
- - << : *scan
726
+ - << : *fileScan
691
727
- << : *validate
728
+ virustotal-url :
729
+ executor : linux-executor
730
+ parameters :
731
+ fileName :
732
+ description : File name
733
+ type : string
734
+ steps :
735
+ - checkout
736
+ - run :
737
+ name : export URL environment variable
738
+ command : |
739
+ echo 'export URL="https://download.redisinsight.redis.com/latest/<< parameters.fileName >>"' >> $BASH_ENV
740
+ echo 'export BUILD_NAME="<< parameters.fileName >>"' >> $BASH_ENV
741
+ - << : *urlScan
742
+ - << : *validate
743
+ - << : *virustotalReport
744
+
745
+ virustotal-report :
746
+ executor : linux-executor
747
+ steps :
748
+ - checkout
749
+ - run :
750
+ name : Send virustotal passed report
751
+ command : |
752
+ echo 'export VIRUS_CHECK_FAILED=0' >> $BASH_ENV
753
+ echo 'export SKIP_VIRUSTOTAL_REPORT=false' >> $BASH_ENV
754
+ - << : *virustotalReport
692
755
docker :
693
756
executor : linux-executor
694
757
parameters :
@@ -1158,27 +1221,42 @@ workflows:
1158
1221
env : prod
1159
1222
requires : *prodElectronBuildRequires
1160
1223
# virus check all electron apps (prod)
1161
- - virustotal :
1224
+ - virustotal-file :
1162
1225
name : Virus check - AppImage (prod)
1163
1226
ext : .AppImage
1164
1227
requires :
1165
1228
- Build app - Linux (prod)
1166
- - virustotal :
1229
+ - virustotal-file :
1167
1230
name : Virus check - deb (prod)
1168
1231
ext : .deb
1169
1232
requires :
1170
1233
- Build app - Linux (prod)
1171
- - virustotal :
1234
+ - virustotal-file :
1235
+ name : Virus check - rpm (prod)
1236
+ ext : .rpm
1237
+ requires :
1238
+ - Build app - Linux (prod)
1239
+ - virustotal-file :
1240
+ name : Virus check - snap (prod)
1241
+ ext : .snap
1242
+ requires :
1243
+ - Build app - Linux (prod)
1244
+ - virustotal-file :
1172
1245
name : Virus check x64 - dmg (prod)
1173
1246
ext : -x64.dmg
1174
1247
requires :
1175
1248
- Build app - MacOS (prod)
1176
- - virustotal :
1249
+ - virustotal-file :
1177
1250
name : Virus check arm64 - dmg (prod)
1178
1251
ext : -arm64.dmg
1179
1252
requires :
1180
1253
- Build app - MacOS (prod)
1181
- - virustotal :
1254
+ - virustotal-file :
1255
+ name : Virus check MAS - pkg (prod)
1256
+ ext : -mas.pkg
1257
+ requires :
1258
+ - Build app - MacOS (prod)
1259
+ - virustotal-file :
1182
1260
name : Virus check - exe (prod)
1183
1261
ext : .exe
1184
1262
requires :
@@ -1189,8 +1267,11 @@ workflows:
1189
1267
requires :
1190
1268
- Virus check - AppImage (prod)
1191
1269
- Virus check - deb (prod)
1270
+ - Virus check - rpm (prod)
1271
+ - Virus check - snap (prod)
1192
1272
- Virus check x64 - dmg (prod)
1193
1273
- Virus check arm64 - dmg (prod)
1274
+ - Virus check MAS - pkg (prod)
1194
1275
- Virus check - exe (prod)
1195
1276
# Manual approve for publish release
1196
1277
- approve-publish :
@@ -1229,10 +1310,10 @@ workflows:
1229
1310
name : Build app - Linux (stage)
1230
1311
requires :
1231
1312
- Setup build (stage)
1232
- # - windows:
1233
- # name: Build app - Windows (stage)
1234
- # requires:
1235
- # - Setup build (stage)
1313
+ # - windows:
1314
+ # name: Build app - Windows (stage)
1315
+ # requires:
1316
+ # - Setup build (stage)
1236
1317
# integration tests on docker image build
1237
1318
- integration-tests-run :
1238
1319
matrix :
@@ -1253,12 +1334,49 @@ workflows:
1253
1334
requires :
1254
1335
- Build docker image
1255
1336
# e2e desktop tests on AppImage build
1256
- # - e2e-app-image:
1257
- # name: E2ETest (AppImage) - Nightly
1258
- # parallelism: 4
1259
- # report: true
1260
- # requires:
1261
- # - Build app - Linux (stage)
1337
+ - e2e-app-image :
1338
+ name : E2ETest (AppImage) - Nightly
1339
+ parallelism : 2
1340
+ report : true
1341
+ requires :
1342
+ - Build app - Linux (stage)
1343
+
1344
+ - virustotal-url :
1345
+ name : Virus check - AppImage (nightly)
1346
+ fileName : RedisInsight-v2-linux-x86_64.AppImage
1347
+ - virustotal-url :
1348
+ name : Virus check - deb (nightly)
1349
+ fileName : RedisInsight-v2-linux-amd64.deb
1350
+ - virustotal-url :
1351
+ name : Virus check - rpm (nightly)
1352
+ fileName : RedisInsight-v2-linux-x86_64.rpm
1353
+ - virustotal-url :
1354
+ name : Virus check - snap (nightly)
1355
+ fileName : RedisInsight-v2-linux-amd64.snap
1356
+ - virustotal-url :
1357
+ name : Virus check x64 - dmg (nightly)
1358
+ fileName : RedisInsight-v2-mac-x64.dmg
1359
+ - virustotal-url :
1360
+ name : Virus check arm64 - dmg (nightly)
1361
+ fileName : RedisInsight-v2-mac-arm64.dmg
1362
+ - virustotal-url :
1363
+ name : Virus check MAS - pkg (nightly)
1364
+ fileName : RedisInsight-mac-universal-mas.pkg
1365
+ - virustotal-url :
1366
+ name : Virus check - exe (nightly)
1367
+ fileName : RedisInsight-v2-win-installer.exe
1368
+ - virustotal-report :
1369
+ name : Virus check report (prod)
1370
+ requires :
1371
+ - Virus check - AppImage (nightly)
1372
+ - Virus check - deb (nightly)
1373
+ - Virus check - rpm (nightly)
1374
+ - Virus check - snap (nightly)
1375
+ - Virus check x64 - dmg (nightly)
1376
+ - Virus check arm64 - dmg (nightly)
1377
+ - Virus check MAS - pkg (nightly)
1378
+ - Virus check - exe (nightly)
1379
+
1262
1380
# # e2e desktop tests on exe build
1263
1381
# - e2e-exe:
1264
1382
# name: E2ETest (exe) - Nightly
0 commit comments