@@ -164,6 +164,14 @@ aliases:
164
164
key : v1-ui-deps-{{ checksum "yarn.lock" }}
165
165
api-deps-cache-key : &apiDepsCacheKey
166
166
key : v1-ui-deps-{{ checksum "redisinsight/api/yarn.lock" }}
167
+ manual-build-conditions : &manual-build-conditions
168
+ or :
169
+ - << pipeline.parameters.linux >>
170
+ - << pipeline.parameters.mac >>
171
+ - << pipeline.parameters.windows >>
172
+ ignore-for-manual-build : &ignore-for-manual-build
173
+ when :
174
+ not : *manual-build-conditions
167
175
168
176
orbs :
169
177
@@ -179,6 +187,17 @@ executors:
179
187
image : ubuntu-2004:2023.04.2
180
188
docker_layer_caching : true
181
189
190
+ parameters :
191
+ linux :
192
+ type : string
193
+ default : &ignore ""
194
+ mac :
195
+ type : string
196
+ default : *ignore
197
+ windows :
198
+ type : string
199
+ default : *ignore
200
+
182
201
jobs :
183
202
# Test jobs
184
203
unit-tests-ui :
@@ -479,6 +498,21 @@ jobs:
479
498
destination : tests/e2e/report
480
499
481
500
# Build jobs
501
+ manual-build-validate :
502
+ parameters :
503
+ os :
504
+ type : string
505
+ default : " "
506
+ target :
507
+ type : string
508
+ default : " "
509
+ docker :
510
+ - image : cimg/node:18.15.0
511
+ steps :
512
+ - checkout
513
+ - run :
514
+ command : |
515
+ node .circleci/build/manual-build-validate.js << parameters.os >> << parameters.target >>
482
516
setup-sign-certificates :
483
517
executor : linux-executor
484
518
steps :
@@ -533,6 +567,10 @@ jobs:
533
567
description : Build RedisStack archives
534
568
type : boolean
535
569
default : true
570
+ target :
571
+ description : Build target
572
+ type : string
573
+ default : " "
536
574
steps :
537
575
- checkout
538
576
- node/install :
@@ -580,11 +618,11 @@ jobs:
580
618
export RI_CLOUD_CAPI_URL=$RI_CLOUD_CAPI_URL_STAGE
581
619
582
620
if [ << parameters.env >> == 'stage' ]; then
583
- UPGRADES_LINK=$UPGRADES_LINK_STAGE SEGMENT_WRITE_KEY=$SEGMENT_WRITE_KEY_STAGE yarn package:stage
621
+ UPGRADES_LINK=$UPGRADES_LINK_STAGE SEGMENT_WRITE_KEY=$SEGMENT_WRITE_KEY_STAGE yarn package:stage --linux << parameters.target >>
584
622
exit 0;
585
623
fi
586
624
587
- UPGRADES_LINK='' SEGMENT_WRITE_KEY='' yarn package:stage
625
+ UPGRADES_LINK='' SEGMENT_WRITE_KEY='' yarn package:stage --linux << parameters.target >>
588
626
- when :
589
627
condition :
590
628
equal : [ true, << parameters.redisstack >> ]
@@ -613,7 +651,6 @@ jobs:
613
651
- release/RedisInsight*.snap
614
652
- release/*-linux.yml
615
653
- release/redisstack
616
-
617
654
macosx :
618
655
macos :
619
656
xcode : 14.2.0
@@ -624,6 +661,14 @@ jobs:
624
661
type : enum
625
662
default : stage
626
663
enum : ['stage', 'prod', 'dev']
664
+ redisstack :
665
+ description : Build RedisStack archives
666
+ type : boolean
667
+ default : true
668
+ target :
669
+ description : Build target
670
+ type : string
671
+ default : " "
627
672
steps :
628
673
- checkout
629
674
- node/install :
@@ -665,24 +710,34 @@ jobs:
665
710
export RI_CLOUD_IDP_GH_ID=$RI_CLOUD_IDP_GH_ID_STAGE
666
711
export RI_CLOUD_API_URL=$RI_CLOUD_API_URL_STAGE
667
712
export RI_CLOUD_CAPI_URL=$RI_CLOUD_CAPI_URL_STAGE
713
+ export UPGRADES_LINK=''
714
+ export SEGMENT_WRITE_KEY=''
668
715
669
716
if [ << parameters.env >> == 'stage' ]; then
670
- UPGRADES_LINK=$UPGRADES_LINK_STAGE SEGMENT_WRITE_KEY=$SEGMENT_WRITE_KEY_STAGE yarn package:stage && yarn package:mas
717
+ export UPGRADES_LINK=$UPGRADES_LINK_STAGE
718
+ export SEGMENT_WRITE_KEY=$SEGMENT_WRITE_KEY_STAGE
719
+ fi
720
+
721
+ # handle manual builds
722
+ if [ << parameters.target >> ]; then
723
+ yarn package:stage --mac << parameters.target >>
671
724
rm -rf release/mac
672
- mv release/mas-universal/RedisInsight-mac-universal-mas.pkg release/RedisInsight-mac-universal-mas.pkg
673
725
exit 0;
674
726
fi
675
727
676
- UPGRADES_LINK='' SEGMENT_WRITE_KEY='' yarn package:stage && yarn package:mas
728
+ yarn package:stage && yarn package:mas
677
729
rm -rf release/mac
678
730
mv release/mas-universal/RedisInsight-mac-universal-mas.pkg release/RedisInsight-mac-universal-mas.pkg
679
731
no_output_timeout : 60m
680
-
681
- - run :
682
- name : Repack dmg to tar
683
- command : |
684
- ARCH=x64 ./.circleci/redisstack/dmg.repack.sh
685
- ARCH=arm64 ./.circleci/redisstack/dmg.repack.sh
732
+ - when :
733
+ condition :
734
+ equal : [ true, << parameters.redisstack >> ]
735
+ steps :
736
+ - run :
737
+ name : Repack dmg to tar
738
+ command : |
739
+ ARCH=x64 ./.circleci/redisstack/dmg.repack.sh
740
+ ARCH=arm64 ./.circleci/redisstack/dmg.repack.sh
686
741
- persist_to_workspace :
687
742
root : .
688
743
paths :
@@ -701,6 +756,10 @@ jobs:
701
756
type : enum
702
757
default : stage
703
758
enum : ['stage', 'prod', 'dev']
759
+ target :
760
+ description : Build target
761
+ type : string
762
+ default : " "
704
763
steps :
705
764
- checkout
706
765
- attach_workspace :
@@ -733,12 +792,11 @@ jobs:
733
792
export RI_CLOUD_CAPI_URL=$RI_CLOUD_CAPI_URL_STAGE
734
793
735
794
if [ << parameters.env >> == 'stage' ]; then
736
- UPGRADES_LINK=$UPGRADES_LINK_STAGE SEGMENT_WRITE_KEY=$SEGMENT_WRITE_KEY_STAGE yarn package:stage
737
- rm -rf release/win-unpacked
738
- exit 0;
795
+ UPGRADES_LINK=$UPGRADES_LINK_STAGE SEGMENT_WRITE_KEY=$SEGMENT_WRITE_KEY_STAGE yarn package:stage --win << parameters.target >>
796
+ else
797
+ UPGRADES_LINK='' SEGMENT_WRITE_KEY='' yarn package:stage --win << parameters.target >>
739
798
fi
740
799
741
- UPGRADES_LINK='' SEGMENT_WRITE_KEY='' yarn package:stage
742
800
rm -rf release/win-unpacked
743
801
shell : bash.exe
744
802
no_output_timeout : 20m
@@ -780,7 +838,6 @@ jobs:
780
838
- << : *urlScan
781
839
- << : *validate
782
840
- << : *virustotalReport
783
-
784
841
virustotal-report :
785
842
executor : linux-executor
786
843
steps :
@@ -879,6 +936,15 @@ jobs:
879
936
applicationVersion=$(jq -r '.version' redisinsight/package.json)
880
937
881
938
aws s3 cp release/ s3://${AWS_BUCKET_NAME_TEST}/public/rs-ri-builds/${CIRCLE_BUILD_NUM} --recursive
939
+ release-aws-manual :
940
+ executor : linux-executor
941
+ steps :
942
+ - checkout
943
+ - attach_workspace :
944
+ at : .
945
+ - run :
946
+ command : |
947
+ aws s3 cp release/ s3://${AWS_BUCKET_NAME_TEST}/public/manual-builds/${CIRCLE_BUILD_NUM} --recursive --exclude "*" --include "RedisInsight*"
882
948
883
949
release-aws-private :
884
950
executor : linux-executor
@@ -1035,9 +1101,11 @@ jobs:
1035
1101
1036
1102
done
1037
1103
1104
+
1038
1105
workflows :
1039
1106
# FE Unit tests for "fe/feature" or "fe/bugfix" branches only
1040
1107
frontend-tests :
1108
+ << : *ignore-for-manual-build
1041
1109
jobs :
1042
1110
- unit-tests-ui :
1043
1111
name : UTest - UI
@@ -1048,6 +1116,7 @@ workflows:
1048
1116
- /^fe/bugfix.*/
1049
1117
# BE Unit + Integration (limited RTEs) tests for "be/feature" or "be/bugfix" branches only
1050
1118
backend-tests :
1119
+ << : *ignore-for-manual-build
1051
1120
jobs :
1052
1121
- unit-tests-api :
1053
1122
name : UTest - API
@@ -1104,6 +1173,7 @@ workflows:
1104
1173
- Build app - Linux (stage)
1105
1174
# Workflow for feature, bugfix, main branches
1106
1175
feature-main-branch :
1176
+ << : *ignore-for-manual-build
1107
1177
jobs :
1108
1178
# Approve to run all (unit, integration, e2e) tests
1109
1179
- approve :
@@ -1161,8 +1231,103 @@ workflows:
1161
1231
only :
1162
1232
- /^e2e/feature.*/
1163
1233
- /^e2e/bugfix.*/
1234
+ # Manual builds using web UI
1235
+ manual-build-linux :
1236
+ when : << pipeline.parameters.linux >>
1237
+ jobs :
1238
+ - manual-build-validate :
1239
+ name : Validating build parameters
1240
+ os : linux
1241
+ target : << pipeline.parameters.linux >>
1242
+ - setup-sign-certificates :
1243
+ name : Setup sign certificates (stage)
1244
+ requires :
1245
+ - Validating build parameters
1246
+ - setup-build :
1247
+ name : Setup build (stage)
1248
+ env : stage
1249
+ requires :
1250
+ - Setup sign certificates (stage)
1251
+ - linux :
1252
+ name : Build app - Linux (stage)
1253
+ env : stage
1254
+ target : << pipeline.parameters.linux >>
1255
+ redisstack : false
1256
+ requires :
1257
+ - Setup build (stage)
1258
+ - store-build-artifacts :
1259
+ name : Store build artifacts (stage)
1260
+ requires :
1261
+ - Build app - Linux (stage)
1262
+ - release-aws-manual :
1263
+ name : Release AWS stage
1264
+ requires :
1265
+ - Build app - Linux (stage)
1266
+ manual-build-mac :
1267
+ when : << pipeline.parameters.mac >>
1268
+ jobs :
1269
+ - manual-build-validate :
1270
+ name : Validating build parameters
1271
+ os : mac
1272
+ target : << pipeline.parameters.mac >>
1273
+ - setup-sign-certificates :
1274
+ name : Setup sign certificates (stage)
1275
+ requires :
1276
+ - Validating build parameters
1277
+ - setup-build :
1278
+ name : Setup build (stage)
1279
+ env : stage
1280
+ requires :
1281
+ - Setup sign certificates (stage)
1282
+ - macosx :
1283
+ name : Build app - MacOS (stage)
1284
+ env : stage
1285
+ redisstack : false
1286
+ target : << pipeline.parameters.mac >>
1287
+ requires :
1288
+ - Setup build (stage)
1289
+ - store-build-artifacts :
1290
+ name : Store build artifacts (stage)
1291
+ requires :
1292
+ - Build app - MacOS (stage)
1293
+ - release-aws-manual :
1294
+ name : Release AWS stage
1295
+ requires :
1296
+ - Build app - MacOS (stage)
1297
+ manual-build-windows :
1298
+ when : << pipeline.parameters.windows >>
1299
+ jobs :
1300
+ - manual-build-validate :
1301
+ name : Validating build parameters
1302
+ os : windows
1303
+ target : << pipeline.parameters.windows >>
1304
+ - setup-sign-certificates :
1305
+ name : Setup sign certificates (stage)
1306
+ requires :
1307
+ - Validating build parameters
1308
+ - setup-build :
1309
+ name : Setup build (stage)
1310
+ env : stage
1311
+ requires :
1312
+ - Setup sign certificates (stage)
1313
+ - windows :
1314
+ name : Build app - Windows (stage)
1315
+ env : stage
1316
+ target : << pipeline.parameters.windows >>
1317
+ requires :
1318
+ - Setup build (stage)
1319
+ - store-build-artifacts :
1320
+ name : Store build artifacts (stage)
1321
+ requires :
1322
+ - Build app - Windows (stage)
1323
+ - release-aws-manual :
1324
+ name : Release AWS stage
1325
+ requires :
1326
+ - Build app - Windows (stage)
1327
+
1164
1328
# build electron app (dev) from "build" branches
1165
1329
build :
1330
+ << : *ignore-for-manual-build
1166
1331
jobs :
1167
1332
- setup-sign-certificates :
1168
1333
name : Setup sign certificates (dev)
@@ -1203,6 +1368,7 @@ workflows:
1203
1368
1204
1369
# Main workflow for release/* and latest branches only
1205
1370
release :
1371
+ << : *ignore-for-manual-build
1206
1372
jobs :
1207
1373
# unit tests (on any commit)
1208
1374
- unit-tests-ui :
0 commit comments