Skip to content

Commit 67b00af

Browse files
authored
RI-6910: hide cloud ads (#4421)
* RI-6910: Ability to hide ads * RI-6910: Change to use feature flag * RI-6910: UserProfile tests * RI-6910: Tests * RI-6910: Prettier * RI-6910: Tests * RI-6910: Add tests for UserProfileBadge * RI-6910: add support for multiple feature flags to FeatureFlagComponent * RI-6910: Update screens for module not available * RI-6910: Add tests * RI-6910: updating manual build workflow * RI-6910: enterprise build workflow * RI-6910: Change casing of module names
1 parent 5c5cdca commit 67b00af

Some content is hidden

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

45 files changed

+1615
-528
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ on:
1818
description: Enable SSH Debug
1919
type: boolean
2020

21+
enterprise:
22+
description: Enterprise build
23+
type: boolean
24+
2125
jobs:
2226
build-linux:
2327
if: contains(inputs.target, 'linux') || inputs.target == 'all'
@@ -27,6 +31,7 @@ jobs:
2731
environment: ${{ inputs.environment }}
2832
target: ${{ inputs.target }}
2933
debug: ${{ inputs.debug }}
34+
enterprise: ${{ inputs.enterprise }}
3035

3136
build-macos:
3237
if: contains(inputs.target, 'macos') || inputs.target == 'all'
@@ -36,6 +41,7 @@ jobs:
3641
environment: ${{ inputs.environment }}
3742
target: ${{ inputs.target }}
3843
debug: ${{ inputs.debug }}
44+
enterprise: ${{ inputs.enterprise }}
3945

4046
build-windows:
4147
if: contains(inputs.target, 'windows') || inputs.target == 'all'
@@ -44,6 +50,7 @@ jobs:
4450
with:
4551
environment: ${{ inputs.environment }}
4652
debug: ${{ inputs.debug }}
53+
enterprise: ${{ inputs.enterprise }}
4754

4855
build-docker:
4956
if: contains(inputs.target, 'docker') || inputs.target == 'all'
@@ -52,3 +59,4 @@ jobs:
5259
with:
5360
environment: ${{ inputs.environment }}
5461
debug: ${{ inputs.debug }}
62+
enterprise: ${{ inputs.enterprise }}
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: 🚀 Manual build - Enterprise
2+
3+
on:
4+
# Manual trigger build
5+
# No multi-select
6+
# https://github.com/actions/runner/issues/2076
7+
workflow_dispatch:
8+
inputs:
9+
build_docker:
10+
description: Build Docker
11+
type: boolean
12+
required: false
13+
14+
build_windows_x64:
15+
description: Build Windows x64
16+
type: boolean
17+
required: false
18+
19+
build_macos_x64:
20+
description: Build macOS x64
21+
type: boolean
22+
required: false
23+
24+
build_macos_arm64:
25+
description: Build macOS arm64
26+
type: boolean
27+
required: false
28+
29+
build_linux_appimage_x64:
30+
description: Build Linux AppImage x64
31+
type: boolean
32+
required: false
33+
34+
build_linux_deb_x64:
35+
description: Build Linux deb x64
36+
type: boolean
37+
required: false
38+
39+
environment:
40+
description: Environment to run build
41+
type: environment
42+
default: 'development'
43+
required: false
44+
45+
debug:
46+
description: Enable SSH Debug
47+
type: boolean
48+
49+
# Cancel a previous same workflow
50+
concurrency:
51+
group: ${{ github.workflow }}-${{ github.ref }}
52+
cancel-in-progress: true
53+
54+
jobs:
55+
get-selected:
56+
runs-on: ubuntu-latest
57+
outputs: # Set this to consume the output on other job
58+
selected: ${{ steps.get-selected.outputs.selected}}
59+
steps:
60+
- uses: actions/checkout@v4
61+
62+
- id: get-selected
63+
uses: joao-zanutto/[email protected]
64+
with:
65+
format: 'list'
66+
67+
- name: echo selected targets
68+
run: echo ${{ steps.get-selected.outputs.selected }}
69+
70+
manual-build:
71+
needs: get-selected
72+
uses: ./.github/workflows/build.yml
73+
secrets: inherit
74+
with:
75+
target: ${{ needs.get-selected.outputs.selected }}
76+
debug: ${{ inputs.debug }}
77+
environment: ${{ inputs.environment }}
78+
enterprise: true
79+
80+
aws-upload:
81+
uses: ./.github/workflows/aws-upload-dev.yml
82+
secrets: inherit
83+
needs: [manual-build]
84+
if: always()
85+
86+
clean:
87+
uses: ./.github/workflows/clean-deployments.yml
88+
# secrets: inherit
89+
needs: [aws-upload]
90+
if: always()
91+
92+
# Remove artifacts from github actions
93+
remove-artifacts:
94+
name: Remove artifacts
95+
needs: [aws-upload]
96+
if: always()
97+
runs-on: ubuntu-latest
98+
99+
steps:
100+
- uses: actions/checkout@v4
101+
- name: Remove all artifacts
102+
uses: ./.github/actions/remove-artifacts
103+
104+

.github/workflows/manual-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ jobs:
8585
target: ${{ needs.get-selected.outputs.selected }}
8686
debug: ${{ inputs.debug }}
8787
environment: ${{ inputs.environment }}
88+
enterprise: false
8889

8990
aws-upload:
9091
uses: ./.github/workflows/aws-upload-dev.yml

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ on:
1717
default: false
1818
type: boolean
1919

20+
enterprise:
21+
description: Enterprise build
22+
type: boolean
23+
2024
jobs:
2125
build:
2226
name: Build docker
@@ -130,5 +134,6 @@ jobs:
130134
RI_SERVER_TLS_KEY: ${{ secrets.RI_SERVER_TLS_KEY }}
131135
RI_FEATURES_CONFIG_URL: ${{ secrets.RI_FEATURES_CONFIG_URL }}
132136
RI_UPGRADES_LINK: ${{ secrets.RI_UPGRADES_LINK }}
137+
RI_FEATURES_CLOUD_ADS_DEFAULT_FLAG: ${{ inputs.enterprise == 'false' }}
133138

134139

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ on:
2020
default: false
2121
type: boolean
2222

23+
enterprise:
24+
description: Enterprise build
25+
type: boolean
26+
2327
jobs:
2428
build:
2529
name: Build linux
@@ -115,3 +119,4 @@ jobs:
115119
RI_SERVER_TLS_KEY: ${{ secrets.RI_SERVER_TLS_KEY }}
116120
RI_FEATURES_CONFIG_URL: ${{ secrets.RI_FEATURES_CONFIG_URL }}
117121
RI_UPGRADES_LINK: ${{ secrets.RI_UPGRADES_LINK }}
122+
RI_FEATURES_CLOUD_ADS_DEFAULT_FLAG: ${{ inputs.enterprise == 'false' }}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ on:
1919
default: false
2020
type: boolean
2121

22+
enterprise:
23+
description: Enterprise build
24+
type: boolean
25+
2226
jobs:
2327
build:
2428
name: Build macos
@@ -139,3 +143,4 @@ jobs:
139143
RI_SERVER_TLS_KEY: ${{ secrets.RI_SERVER_TLS_KEY }}
140144
RI_FEATURES_CONFIG_URL: ${{ secrets.RI_FEATURES_CONFIG_URL }}
141145
RI_UPGRADES_LINK: ${{ secrets.RI_UPGRADES_LINK }}
146+
RI_FEATURES_CLOUD_ADS_DEFAULT_FLAG: ${{ inputs.enterprise == 'false' }}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
default: false
1313
type: boolean
1414

15+
enterprise:
16+
description: Enterprise build
17+
type: boolean
18+
1519
jobs:
1620
build:
1721
name: Build windows
@@ -84,3 +88,4 @@ jobs:
8488
RI_SERVER_TLS_KEY: ${{ secrets.RI_SERVER_TLS_KEY }}
8589
RI_FEATURES_CONFIG_URL: ${{ secrets.RI_FEATURES_CONFIG_URL }}
8690
RI_UPGRADES_LINK: ${{ secrets.RI_UPGRADES_LINK }}
91+
RI_FEATURES_CLOUD_ADS_DEFAULT_FLAG: ${{ inputs.enterprise == 'false' }}

redisinsight/ui/src/components/config/Config.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ describe('Config', () => {
118118
await waitFor(() => expect(store.getActions()).not.toContainEqual(getUserSettingsSpec()))
119119
})
120120

121-
it('should render expected actions when envDependant feature is off', () => {
121+
it('should render expected actions when envDependent feature is off', () => {
122122
const initialStoreState = set(
123123
cloneDeep(initialStateDefault),
124124
`app.features.featureFlags.features.${FeatureFlags.envDependent}`,

0 commit comments

Comments
 (0)