Skip to content

Commit 535b228

Browse files
committed
Merge branch 'main' into feature/RI-5681-search-and-query
2 parents b25d33f + 7044eab commit 535b228

File tree

264 files changed

+9789
-4015
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

264 files changed

+9789
-4015
lines changed

.circleci/build/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ yarn
66
yarn --cwd redisinsight/api
77

88
# build
9+
910
yarn build:statics
1011
yarn build:ui
1112
yarn --cwd ./redisinsight/api build:prod

.circleci/build/release-docker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -e
33

44
HELP="Args:
5-
-v - Semver (2.56.0)
5+
-v - Semver (2.58.0)
66
-d - Build image repository (Ex: -d redisinsight)
77
-r - Target repository (Ex: -r redis/redisinsight)
88
"

.circleci/config.yml

Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,9 @@ parameters:
213213
redis_client:
214214
type: string
215215
default: ""
216+
env:
217+
type: string
218+
default: "stage"
216219

217220
jobs:
218221
# Test jobs
@@ -1351,24 +1354,24 @@ workflows:
13511354
os: linux
13521355
target: << pipeline.parameters.linux >>
13531356
- setup-sign-certificates:
1354-
name: Setup sign certificates (stage)
1357+
name: Setup sign certificates (<< pipeline.parameters.env >>)
13551358
requires:
13561359
- Validating build parameters
13571360
- setup-build:
1358-
name: Setup build (stage)
1359-
env: stage
1361+
name: Setup build (<< pipeline.parameters.env >>)
1362+
env: << pipeline.parameters.env >>
13601363
requires:
1361-
- Setup sign certificates (stage)
1364+
- Setup sign certificates (<< pipeline.parameters.env >>)
13621365
- linux:
1363-
name: Build app - Linux (stage)
1364-
env: stage
1366+
name: Build app - Linux (<< pipeline.parameters.env >>)
1367+
env: << pipeline.parameters.env >>
13651368
target: << pipeline.parameters.linux >>
13661369
requires:
1367-
- Setup build (stage)
1370+
- Setup build (<< pipeline.parameters.env >>)
13681371
- store-build-artifacts:
1369-
name: Store build artifacts (stage)
1372+
name: Store build artifacts (<< pipeline.parameters.env >>)
13701373
requires:
1371-
- Build app - Linux (stage)
1374+
- Build app - Linux (<< pipeline.parameters.env >>)
13721375
manual-build-mac:
13731376
when: << pipeline.parameters.mac >>
13741377
jobs:
@@ -1377,25 +1380,25 @@ workflows:
13771380
os: mac
13781381
target: << pipeline.parameters.mac >>
13791382
- setup-sign-certificates:
1380-
name: Setup sign certificates (stage)
1383+
name: Setup sign certificates (<< pipeline.parameters.env >>)
13811384
requires:
13821385
- Validating build parameters
13831386
- setup-build:
1384-
name: Setup build (stage)
1385-
env: stage
1387+
name: Setup build (<< pipeline.parameters.env >>)
1388+
env: << pipeline.parameters.env >>
13861389
requires:
1387-
- Setup sign certificates (stage)
1390+
- Setup sign certificates (<< pipeline.parameters.env >>)
13881391
- macosx:
1389-
name: Build app - MacOS (stage)
1390-
env: stage
1392+
name: Build app - MacOS (<< pipeline.parameters.env >>)
1393+
env: << pipeline.parameters.env >>
13911394
redisstack: false
13921395
target: << pipeline.parameters.mac >>
13931396
requires:
1394-
- Setup build (stage)
1397+
- Setup build (<< pipeline.parameters.env >>)
13951398
- store-build-artifacts:
1396-
name: Store build artifacts (stage)
1399+
name: Store build artifacts (<< pipeline.parameters.env >>)
13971400
requires:
1398-
- Build app - MacOS (stage)
1401+
- Build app - MacOS (<< pipeline.parameters.env >>)
13991402
manual-build-windows:
14001403
when: << pipeline.parameters.windows >>
14011404
jobs:
@@ -1404,24 +1407,24 @@ workflows:
14041407
os: windows
14051408
target: << pipeline.parameters.windows >>
14061409
- setup-sign-certificates:
1407-
name: Setup sign certificates (stage)
1410+
name: Setup sign certificates (<< pipeline.parameters.env >>)
14081411
requires:
14091412
- Validating build parameters
14101413
- setup-build:
1411-
name: Setup build (stage)
1412-
env: stage
1414+
name: Setup build (<< pipeline.parameters.env >>)
1415+
env: << pipeline.parameters.env >>
14131416
requires:
1414-
- Setup sign certificates (stage)
1417+
- Setup sign certificates (<< pipeline.parameters.env >>)
14151418
- windows:
1416-
name: Build app - Windows (stage)
1417-
env: stage
1419+
name: Build app - Windows (<< pipeline.parameters.env >>)
1420+
env: << pipeline.parameters.env >>
14181421
target: << pipeline.parameters.windows >>
14191422
requires:
1420-
- Setup build (stage)
1423+
- Setup build (<< pipeline.parameters.env >>)
14211424
- store-build-artifacts:
1422-
name: Store build artifacts (stage)
1425+
name: Store build artifacts (<< pipeline.parameters.env >>)
14231426
requires:
1424-
- Build app - Windows (stage)
1427+
- Build app - Windows (<< pipeline.parameters.env >>)
14251428
manual-build-docker:
14261429
when: << pipeline.parameters.docker >>
14271430
jobs:
@@ -1430,22 +1433,22 @@ workflows:
14301433
os: docker
14311434
target: << pipeline.parameters.docker >>
14321435
- setup-sign-certificates:
1433-
name: Setup sign certificates (stage)
1436+
name: Setup sign certificates (<< pipeline.parameters.env >>)
14341437
requires:
14351438
- Validating build parameters
14361439
- setup-build:
1437-
name: Setup build (stage)
1438-
env: stage
1440+
name: Setup build (<< pipeline.parameters.env >>)
1441+
env: << pipeline.parameters.env >>
14391442
requires:
1440-
- Setup sign certificates (stage)
1443+
- Setup sign certificates (<< pipeline.parameters.env >>)
14411444
- docker:
1442-
name: Build docker images (stage)
1445+
name: Build docker images (<< pipeline.parameters.env >>)
14431446
requires:
1444-
- Setup build (stage)
1447+
- Setup build (<< pipeline.parameters.env >>)
14451448
- store-build-artifacts:
1446-
name: Store build artifacts (stage)
1449+
name: Store build artifacts (<< pipeline.parameters.env >>)
14471450
requires:
1448-
- Build docker images (stage)
1451+
- Build docker images (<< pipeline.parameters.env >>)
14491452

14501453
# build electron app (dev) from "build" branches
14511454
build:
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Install all libraries action
2+
description: Install all libraries and dependencies
3+
inputs:
4+
skip-electron-deps:
5+
description: Skip install electron dependencies
6+
default: '0'
7+
required: false
8+
9+
skip-backend-deps:
10+
description: Skip install backend dependencies
11+
default: '0'
12+
required: false
13+
14+
skip-postinstall:
15+
description: Skip postinstall
16+
default: '0'
17+
required: false
18+
19+
keytar-host-mirror:
20+
description: Keytar binary host mirror
21+
required: false
22+
23+
sqlite3-host-mirror:
24+
description: SQLite3 binary host mirror
25+
required: false
26+
27+
#TODO: check !contains
28+
29+
runs:
30+
using: 'composite'
31+
steps:
32+
# OS libraries
33+
- name: Setup Node
34+
uses: actions/[email protected]
35+
with:
36+
node-version: '20.15'
37+
# disable cache for windows
38+
# https://github.com/actions/setup-node/issues/975
39+
cache: ${{ runner.os != 'Windows' && 'yarn' || '' }}
40+
cache-dependency-path: ${{ runner.os != 'Windows' && '**/yarn.lock' || '' }}
41+
42+
# - run: echo "inputs.skip-electron-deps"
43+
# - run: echo "${{inputs.skip-electron-deps}}"
44+
# - run: echo "inputs.skip-backend-deps"
45+
# - run: echo "${{inputs.skip-backend-deps}}"
46+
47+
- name: Setup Python
48+
# if: ${{ contains(inputs.skip-electron-deps, '1') }}
49+
uses: actions/setup-python@v5
50+
with:
51+
python-version: '3.11'
52+
53+
- name: Install linux libraries
54+
if: ${{ runner.os == 'Linux' }}
55+
# if: ${{ runner.os == 'Linux' && !contains(inputs.skip-electron-deps, '1') }}
56+
shell: bash
57+
run: |
58+
sudo apt-get update -qy
59+
sudo apt-get install -qy libsecret-1-dev rpm
60+
61+
- name: Install macos libraries
62+
if: ${{ runner.os == 'macOS' }}
63+
# if: ${{ runner.os == 'macOS' && !contains(inputs.skip-electron-deps, '1') }}
64+
shell: bash
65+
run: |
66+
brew install libsecret
67+
68+
# TODO: matrix?
69+
# Javascript dependencies
70+
- name: Install dependencies for redisinsight package.js
71+
# if: ${{ contains(inputs.skip-electron-deps, '1') }}
72+
uses: ./.github/actions/install-deps
73+
with:
74+
dir-path: './redisinsight'
75+
keytar-host-mirror: ${{ inputs.keytar-host-mirror }}
76+
sqlite3-host-mirror: ${{ inputs.sqlite3-host-mirror }}
77+
78+
- name: Install dependencies for BE package.js
79+
# if: ${{ !contains(inputs.skip-backend-deps, '1') }}
80+
uses: ./.github/actions/install-deps
81+
with:
82+
dir-path: './redisinsight/api'
83+
84+
- name: Install dependencies for root package.js
85+
# if: ${{ contains(inputs.skip-electron-deps, '1') }}
86+
uses: ./.github/actions/install-deps
87+
with:
88+
dir-path: './'
89+
keytar-host-mirror: ${{ inputs.keytar-host-mirror }}
90+
sqlite3-host-mirror: ${{ inputs.sqlite3-host-mirror }}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Add certs to the keychain (macos)
2+
3+
inputs:
4+
CSC_P12_BASE64:
5+
required: true
6+
CSC_MAC_INSTALLER_P12_BASE64:
7+
required: true
8+
CSC_MAS_P12_BASE64:
9+
required: true
10+
CSC_KEY_PASSWORD:
11+
required: true
12+
CSC_MAS_PASSWORD:
13+
required: true
14+
CSC_MAC_INSTALLER_PASSWORD:
15+
required: true
16+
17+
runs:
18+
using: 'composite'
19+
steps:
20+
- name: Setup sign certificates
21+
shell: bash
22+
env:
23+
CSC_P12_BASE64: ${{ inputs.CSC_P12_BASE64 }}
24+
CSC_MAC_INSTALLER_P12_BASE64: ${{ inputs.CSC_MAC_INSTALLER_P12_BASE64 }}
25+
CSC_MAS_P12_BASE64: ${{ inputs.CSC_MAS_P12_BASE64 }}
26+
run: |
27+
mkdir -p certs
28+
echo "$CSC_P12_BASE64" | base64 -d > certs/mac-developer.p12
29+
echo "$CSC_MAC_INSTALLER_P12_BASE64" | base64 -d > certs/mac-installer.p12
30+
echo "$CSC_MAS_P12_BASE64" | base64 -d > certs/mas-distribution.p12
31+
32+
- name: Add certs to the keychain
33+
shell: bash
34+
env:
35+
KEYCHAIN: redisinsight.keychain
36+
CSC_KEY_PASSWORD: ${{ inputs.CSC_KEY_PASSWORD }}
37+
CSC_MAS_PASSWORD: ${{ inputs.CSC_MAS_PASSWORD }}
38+
CSC_MAC_INSTALLER_PASSWORD: ${{ inputs.CSC_MAC_INSTALLER_PASSWORD }}
39+
run: |
40+
security create-keychain -p mysecretpassword $KEYCHAIN
41+
security default-keychain -s $KEYCHAIN
42+
security unlock-keychain -p mysecretpassword $KEYCHAIN
43+
security set-keychain-settings -u -t 10000000 $KEYCHAIN
44+
security import certs/mac-developer.p12 -k $KEYCHAIN -P "$CSC_KEY_PASSWORD" -T /usr/bin/codesign -T /usr/bin/productbuild
45+
security import certs/mas-distribution.p12 -k $KEYCHAIN -P "$CSC_MAS_PASSWORD" -T /usr/bin/codesign -T /usr/bin/productbuild
46+
security import certs/mac-installer.p12 -k $KEYCHAIN -P "$CSC_MAC_INSTALLER_PASSWORD" -T /usr/bin/codesign -T /usr/bin/productbuild
47+
security set-key-partition-list -S apple-tool:,apple: -s -k mysecretpassword $KEYCHAIN
48+
security list-keychain -d user -s $KEYCHAIN
49+
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Install Dependencies action
2+
description: Caches and installs dependencies for a given path
3+
inputs:
4+
dir-path:
5+
description: Path to the directory
6+
required: true
7+
keytar-host-mirror:
8+
description: Keytar binary host mirror
9+
required: false
10+
sqlite3-host-mirror:
11+
description: SQLite3 binary host mirror
12+
required: false
13+
skip-postinstall:
14+
description: Skip postinstall
15+
required: false
16+
default: '0'
17+
18+
runs:
19+
using: 'composite'
20+
steps:
21+
- name: Install dependencies
22+
working-directory: ${{ inputs.dir-path }}
23+
shell: bash
24+
25+
# env:
26+
# SKIP_POSTINSTALL: ${{ inputs.skip-postinstall }}
27+
# run: yarn install
28+
run: |
29+
export npm_config_keytar_binary_host_mirror=${{ inputs.keytar-host-mirror }}
30+
export npm_config_node_sqlite3_binary_host_mirror=${{ inputs.sqlite3-host-mirror }}
31+
32+
yarn install
33+
echo $SKIP_POSTINSTALL
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Install Windows certs
2+
3+
inputs:
4+
WIN_CSC_PFX_BASE64:
5+
required: true
6+
7+
runs:
8+
using: 'composite'
9+
steps:
10+
- name: Setup sign certificates
11+
shell: bash
12+
env:
13+
WIN_CSC_PFX_BASE64: ${{ inputs.WIN_CSC_PFX_BASE64 }}
14+
run: |
15+
mkdir -p certs
16+
echo "$WIN_CSC_PFX_BASE64" | base64 -d > certs/redislabs_win.pfx

0 commit comments

Comments
 (0)