Skip to content

Commit baa804d

Browse files
authored
Merge pull request #6595 from FlowFuse/chore-update-prestaging-features
chore: Update features for teams on pre-staging
2 parents c5410a0 + c79a4cc commit baa804d

3 files changed

Lines changed: 43 additions & 12 deletions

File tree

.github/scripts/initial-setup.sh

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ INIT_CONFIG_PASSWORD_HASH=$2
88
INIT_CONFIG_ACCESS_TOKEN_HASH=$3
99
INIT_CONFIG_ACCESS_TOKEN=$4
1010
INIT_CONFIG_PASSWORD=$5
11-
FLOWFUSE_URL="${6:-$PR_NUMBER.flowfuse.dev}"
11+
FF_NODES_TOKEN=$6
12+
FLOWFUSE_URL="${7:-$PR_NUMBER.flowfuse.dev}"
1213

1314

1415
create_user() {
@@ -166,6 +167,14 @@ kubectl run flowfuse-setup-2 \
166167
"INSERT INTO public.\"AccessTokens\" (token,\"expiresAt\",scope,\"ownerId\",\"ownerType\",\"refreshToken\",name,\"createdAt\",\"updatedAt\") \
167168
VALUES ('$INIT_CONFIG_ACCESS_TOKEN_HASH',NULL,'','1','user',NULL,'setup','2024-03-18 10:46:54.055+01','2024-03-18 10:46:54.055+01');"
168169

170+
### Configure ff-npm-registry token
171+
echo "Configuring ff-npm-registry token"
172+
curl -ks -w "\n" -XPUT \
173+
-H "Content-Type: application/json" \
174+
-H "Authorization: Bearer $INIT_CONFIG_ACCESS_TOKEN" \
175+
-d '{"platform:ff-npm-registry:token": "'"$FF_NODES_TOKEN"'"}' \
176+
https://$FLOWFUSE_URL/api/v1/settings/
177+
169178
### Create project type
170179
echo "Creating project type"
171180
curl -ks -w "\n" -XPOST \
@@ -211,22 +220,23 @@ curl -ks -w "\n" -XPOST \
211220
"limit": 10
212221
},
213222
"features": {
214-
"shared-library": false,
215-
"projectComms": false,
223+
"shared-library": true,
224+
"projectComms": true,
216225
"ha": false,
217226
"teamHttpSecurity": false,
218227
"customCatalogs": false,
219228
"deviceGroups": false,
220229
"emailAlerts": false,
221230
"protectedInstance": false,
222-
"deviceAutoSnapshot": false,
231+
"deviceAutoSnapshot": true,
223232
"instanceAutoSnapshot": false,
224233
"editorLimits": false,
225234
"fileStorageLimit": null,
226235
"contextLimit": null,
227236
"customHostnames":false,
228237
"staticAssets":false,
229-
"teamBroker":false
238+
"teamBroker":false,
239+
"ffNodes": true
230240
},
231241
"instances": {
232242
"'"$projectTypeId"'": {
@@ -254,7 +264,7 @@ curl -ks -w "\n" -XPOST \
254264
"limit": 10
255265
},
256266
"features":{
257-
"ha":true,
267+
"ha":false,
258268
"shared-library":true,
259269
"projectComms":true,
260270
"teamHttpSecurity":true,
@@ -267,11 +277,14 @@ curl -ks -w "\n" -XPOST \
267277
"instanceAutoSnapshot":true,
268278
"protectedInstance":true,
269279
"editorLimits":true,
270-
"customHostnames":true,
280+
"customHostnames":false,
271281
"staticAssets":true,
272282
"projectHistory":true,
273283
"teamBroker":true,
274-
"generatedSnapshotDescription":true
284+
"generatedSnapshotDescription":true,
285+
"assistantInlineCompletions": true,
286+
"npm": true,
287+
"ffNodes": true
275288
},
276289
"instances": {
277290
"'"$projectTypeId"'": {
@@ -319,7 +332,13 @@ curl -ks -w "\n" -XPOST \
319332
"teamBroker":true,
320333
"gitIntegration": true,
321334
"instanceResources":true,
322-
"generatedSnapshotDescription":true
335+
"generatedSnapshotDescription":true,
336+
"assistantInlineCompletions": true,
337+
"ffNodes": true,
338+
"rbacApplication": true,
339+
"npm": true,
340+
"ffNodes": true,
341+
"tables": true
323342
},
324343
"instances": {
325344
"'"$projectTypeId"'": {

.github/workflows/branch-deploy.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -460,14 +460,17 @@ jobs:
460460
--set forge.email.ses.sourceArn=arn:aws:ses:eu-west-1:${{ secrets.AWS_ACCOUNT_ID }}:identity/flowfuse.com \
461461
--set forge.assistant.service.url=$(op read op://ci/staging_flowfuse/assistant_url) \
462462
--set forge.assistant.service.token=$(op read op://ci/staging_flowfuse/assistant_token) \
463-
--set forge.expert.service.url=$(op read op://ci/staging_flowfuse/expert_url) \
464-
--set forge.expert.service.token=$(op read op://ci/staging_flowfuse/expert_token) \
463+
--set forge.expert.service.url=$(op read op://ci/prestaging_flowfuse/expert_url) \
464+
--set forge.expert.service.token=$(op read op://ci/prestaging_flowfuse/expert_token) \
465+
--set forge.tables.driver.options.database.user=$(op read op://ci/prestaging_flowfuse/local_postgres_admin_username) \
466+
--set forge.tables.driver.options.database.password=$(op read op://ci/prestaging_flowfuse/local_postgres_admin_password) \
467+
--set forge.tables.driver.options.database.host=flowfuse-pr-${{ env.PR_NUMBER }}-postgresql.pr-${{ env.PR_NUMBER }}.svc.cluster.local \
465468
flowfuse-pr-${{ env.PR_NUMBER }} ./helm-repo/helm/flowfuse
466469
467470
- name: Initial setup
468471
if: ${{ env.initialSetup == 'true' }}
469472
run: |
470-
./.github/scripts/initial-setup.sh ${{ env.PR_NUMBER }} ${{ secrets.INIT_CONFIG_PASSWORD_HASH }} ${{ secrets.INIT_CONFIG_ACCESS_TOKEN_HASH }} ${{ secrets.INIT_CONFIG_ACCESS_TOKEN }} ${{ secrets.INIT_CONFIG_PASSWORD }}
473+
./.github/scripts/initial-setup.sh ${{ env.PR_NUMBER }} ${{ secrets.INIT_CONFIG_PASSWORD_HASH }} ${{ secrets.INIT_CONFIG_ACCESS_TOKEN_HASH }} ${{ secrets.INIT_CONFIG_ACCESS_TOKEN }} ${{ secrets.INIT_CONFIG_PASSWORD }} ${{ secrets.PRE_STAGING_FLOWFUSE_NODES_TOKEN }}
471474
472475
- name: Summary
473476
run: |

ci/ci-values.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ forge:
2727
max: 600
2828
maxAnonymous: 10
2929
timeWindow: 30000
30+
tables:
31+
enabled: true
32+
driver:
33+
type: postgres-localfs
34+
options:
35+
database:
36+
port: 5432
37+
database: postgres
38+
ssl: false
3039

3140
postgresql:
3241
persistence:

0 commit comments

Comments
 (0)