Skip to content

Commit 975f2b9

Browse files
authored
Merge pull request #4133 from RedisInsight/be/feature/RI-6349_Fix_mas_build
#RI-6325, #RI-6349, #RI-6355
2 parents 1d95d8a + b714b19 commit 975f2b9

File tree

16 files changed

+99
-99
lines changed

16 files changed

+99
-99
lines changed

.github/workflows/pipeline-build-docker.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ on:
77
default: 'staging'
88
type: string
99

10-
only_docker:
11-
description: Build only docker
10+
for_e2e_tests:
11+
description: Build for e2e docker tests
1212
default: false
1313
type: boolean
1414

@@ -45,7 +45,16 @@ jobs:
4545
run: ./.github/build/build.sh
4646

4747
# todo: matrix
48+
- name: Build web archives for e2e tests
49+
if: inputs.for_e2e_tests
50+
run: |
51+
unset npm_config_keytar_binary_host_mirror
52+
unset npm_config_node_sqlite3_binary_host_mirror
53+
# Docker sources
54+
PLATFORM=linux ARCH=x64 LIBC=musl .github/build/build_modules.sh
55+
4856
- name: Build web archives
57+
if: ${{ !inputs.for_e2e_tests }}
4958
run: |
5059
unset npm_config_keytar_binary_host_mirror
5160
unset npm_config_node_sqlite3_binary_host_mirror
@@ -60,10 +69,8 @@ jobs:
6069
PLATFORM=darwin ARCH=arm64 .github/build/build_modules.sh
6170
# VSC Windows
6271
PLATFORM=win32 ARCH=x64 .github/build/build_modules.sh
63-
- name: Build Docker (x64, arm64)
64-
env:
65-
ENV: ${{ vars.ENV }}
66-
RI_SEGMENT_WRITE_KEY: ${{ secrets.RI_SEGMENT_WRITE_KEY }}
72+
73+
- name: Build Docker (x64)
6774
run: |
6875
# Build alpine x64 image
6976
docker buildx build \
@@ -75,6 +82,12 @@ jobs:
7582
-t redisinsight:amd64 \
7683
.
7784
85+
mkdir -p release/docker
86+
docker image save -o release/docker/docker-linux-alpine.amd64.tar redisinsight:amd64
87+
88+
- name: Build Docker (arm64)
89+
if: ${{ !inputs.for_e2e_tests }}
90+
run: |
7891
# Build alpine arm64 image
7992
docker buildx build \
8093
-f .github/build/build.Dockerfile \
@@ -86,7 +99,6 @@ jobs:
8699
.
87100
88101
mkdir -p release/docker
89-
docker image save -o release/docker/docker-linux-alpine.amd64.tar redisinsight:amd64
90102
docker image save -o release/docker/docker-linux-alpine.arm64.tar redisinsight:arm64
91103
92104
- uses: actions/upload-artifact@v4
@@ -100,6 +112,7 @@ jobs:
100112
./release/web-mini
101113
102114
env:
115+
ENV: ${{ vars.ENV }}
103116
RI_AI_CONVAI_TOKEN: ${{ secrets.RI_AI_CONVAI_TOKEN }}
104117
RI_AI_QUERY_PASS: ${{ secrets.RI_AI_QUERY_PASS }}
105118
RI_AI_QUERY_USER: ${{ secrets.RI_AI_QUERY_USER }}

.github/workflows/pipeline-build-macos.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,10 @@ jobs:
7171
echo $APP_BUNDLE_VERSION
7272
echo $CSC_KEYCHAIN
7373
74-
yarn package:stage
74+
yarn package:stage && yarn package:mas
7575
rm -rf release/mac
76-
77-
# TODO: return MAS build
78-
# yarn package:stage && yarn package:mas
79-
# mv release/mas-universal/Redis-Insight-mac-universal-mas.pkg release/Redis-Insight-mac-universal-mas.pkg
76+
77+
mv release/mas-universal/Redis-Insight-mac-universal-mas.pkg release/Redis-Insight-mac-universal-mas.pkg
8078
8179
# handle manual builds
8280
- name: Build macos dmg (custom)

.github/workflows/tests-e2e-docker.yml

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,6 @@ jobs:
3333
e2e-docker-tests:
3434
runs-on: ubuntu-latest
3535
name: E2E Docker tests
36-
# environment:
37-
# name: production
38-
container:
39-
image: docker:latest
40-
options: --privileged
41-
volumes:
42-
- /usr/src/app/results:/usr/src/app/results
43-
- /usr/src/app/report:/usr/src/app/report
4436
strategy:
4537
fail-fast: false
4638
matrix:
@@ -50,9 +42,6 @@ jobs:
5042
steps:
5143
- uses: actions/checkout@v4
5244

53-
- name: Setup repository
54-
run: git config --global --add safe.directory /__w/RedisInsight/RedisInsight
55-
5645
# SSH Debug
5746
- name: Enable SSH
5847
uses: mxschmitt/action-tmate@v3
@@ -74,6 +63,7 @@ jobs:
7463
working-directory: ./tests/e2e
7564
run: |
7665
testFiles=$(find tests/web -type f -name '*.e2e.ts' | sort | awk "NR % 4 == ${{ matrix.parallel }}")
66+
7767
echo $testFiles
7868
7969
# Multi-Line value
@@ -117,23 +107,8 @@ jobs:
117107
list-suites: 'failed'
118108
fail-on-error: 'false'
119109

120-
- name: Add link to report in the workflow summary
121-
if: always()
122-
run: |
123-
DATE=$(date +'%Y-%m-%d')
124-
link="${{ vars.DEFAULT_TEST_REPORTS_URL }}/${DATE}/${{ github.run_id }}/${{ env.REPORT_NAME }}-${{ matrix.parallel }}/index.html"
125-
126-
echo "- [${link}](${link})" >> $GITHUB_STEP_SUMMARY
127-
128-
# Deploy report to AWS test bucket
129-
deploy-report:
130-
name: Deploy report
131-
needs: 'e2e-docker-tests'
132-
if: always()
133-
runs-on: ubuntu-latest
134-
steps:
135-
- uses: actions/checkout@v4
136110
- name: Deploy report
111+
if: always()
137112
uses: ./.github/actions/deploy-test-reports
138113
with:
139114
group: 'report'
@@ -143,3 +118,12 @@ jobs:
143118
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
144119
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
145120

121+
- name: Add link to report in the workflow summary
122+
if: always()
123+
run: |
124+
DATE=$(date +'%Y-%m-%d')
125+
link="${{ vars.DEFAULT_TEST_REPORTS_URL }}/${DATE}/${{ github.run_id }}/${{ env.REPORT_NAME }}-${{ matrix.parallel }}/index.html"
126+
127+
echo "- [${link}](${link})" >> $GITHUB_STEP_SUMMARY
128+
129+

.github/workflows/tests.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@ jobs:
106106
redis_client: ${{ inputs.redis_client || '' }}
107107
debug: ${{ inputs.debug || false }}
108108

109-
# E2E Approve
109+
# # E2E Approve
110110
e2e-approve:
111111
runs-on: ubuntu-latest
112112
needs: changes
113-
timeout-minutes: 60
114113
if: inputs.group_tests == 'all' || inputs.group_tests == 'only_e2e' || startsWith(github.ref_name, 'e2e/')
114+
timeout-minutes: 60
115115
environment: ${{ startsWith(github.ref_name, 'e2e/') && 'e2e-approve' || 'staging' }}
116116
name: Approve E2E tests
117117
steps:
@@ -124,7 +124,7 @@ jobs:
124124
secrets: inherit
125125
with:
126126
debug: ${{ inputs.debug || false }}
127-
only_docker: true
127+
for_e2e_tests: true
128128

129129
e2e-docker-tests:
130130
needs: build-docker
@@ -139,7 +139,7 @@ jobs:
139139
needs: e2e-approve
140140
secrets: inherit
141141
with:
142-
target: linux:appimage:x64
142+
target: build_linux_appimage_x64
143143
debug: ${{ inputs.debug || false }}
144144

145145
e2e-appimage-tests:
@@ -151,16 +151,14 @@ jobs:
151151

152152
clean:
153153
uses: ./.github/workflows/clean-deployments.yml
154+
if: always()
154155
needs: [frontend-tests, backend-tests, integration-tests, e2e-docker-tests, e2e-appimage-tests]
155-
if: ${{ !inputs.pre_release && always() }}
156156

157157
# Remove artifacts from github actions
158158
remove-artifacts:
159159
name: Remove artifacts
160-
needs: [clean]
161-
if: ${{ !inputs.pre_release && always() }}
160+
needs: [frontend-tests, backend-tests, integration-tests, e2e-docker-tests, e2e-appimage-tests]
162161
runs-on: ubuntu-latest
163-
164162
steps:
165163
- uses: actions/checkout@v4
166164
- name: Remove all artifacts

electron-builder.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@
77
"node_modules",
88
"package.json"
99
],
10-
"npmRebuild": false,
1110
"artifactName": "Redis-Insight-${os}-${arch}.${ext}",
1211
"compression": "normal",
1312
"asarUnpack": [
1413
"node_modules/keytar",
15-
"node_modules/sqlite3",
16-
"node_modules/cpu-features"
14+
"node_modules/sqlite3"
1715
],
1816
"protocols": [{
1917
"name": "RedisInsight",

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@
7878
"**/trim": "0.0.3",
7979
"word-wrap": "1.2.4",
8080
"**/semver": "^7.5.2",
81-
"@electron/notarize": "2.5.0",
8281
"rawproto/protobufjs": "^7.2.5",
8382
"webpack-bundle-analyzer/ws": "^7.5.10",
8483
"msw/path-to-regexp": "^6.3.0",

redisinsight/api/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"@nestjs/platform-socket.io/socket.io": "^4.8.0",
4949
"@nestjs/cli/**/braces": "^3.0.3",
5050
"**/semver": "^7.5.2",
51+
"**/cpu-features": "file:./stubs/cpu-features",
5152
"winston-daily-rotate-file/**/file-stream-rotator": "^1.0.0"
5253
},
5354
"dependencies": {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = {};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "cpu-features",
3+
"version": "1.0.0",
4+
"main": "index.js"
5+
}

redisinsight/api/test/test-runs/test.Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ RUN dbus-uuidgen > /var/lib/dbus/machine-id
66
WORKDIR /usr/src/app
77

88
COPY package.json yarn.lock ./
9+
COPY stubs ./stubs
910
RUN yarn install
1011
COPY . .
1112

0 commit comments

Comments
 (0)