[ACA-4715] upgrade to latest ADF alphas and cleanup env vars (#3312)

* use latest ADF alphas

* use latest ADF alphas

* use ECM provider by default

* use BASIC auth by default

* defaults for oauth host

* remove unused vars
This commit is contained in:
Denys Vuika 2023-07-05 19:46:50 +01:00 committed by GitHub
parent 46ed7a8360
commit 6b003eff1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 38 additions and 67 deletions

View File

@ -26,9 +26,6 @@ runs:
{
echo "APP_CONFIG_ECM_HOST={protocol}//{hostname}{:port}"
echo "APP_CONFIG_PROVIDER=ECM"
echo "APP_CONFIG_AUTH_TYPE=BASIC"
echo "APP_CONFIG_OAUTH2_HOST=http://localhost:4200/auth/realms/alfresco"
} >> .env
npm start > /dev/null &\

View File

@ -27,9 +27,6 @@ runs:
{
echo "APP_CONFIG_ECM_HOST={protocol}//{hostname}{:port}"
echo "APP_CONFIG_PROVIDER=ECM"
echo "APP_CONFIG_AUTH_TYPE=BASIC"
echo "APP_CONFIG_OAUTH2_HOST=http://localhost:4200/auth/realms/alfresco"
} >> .env
npm start > /dev/null &\

View File

@ -25,9 +25,6 @@ env:
SCREENSHOT_PASSWORD: ${{ secrets.SCREENSHOT_PASSWORD}}
AWS_REGION: "eu-west-2"
CONTENT_CE_DIST_PATH: "./dist/content-ce"
APP_CONFIG_PROVIDER: ECM
APP_CONFIG_AUTH_TYPE: BASIC
APP_CONFIG_OAUTH2_HOST: http://localhost:4200/auth/realms/alfresco
PLAYWRIGHT_E2E_HOST: ${{ secrets.PLAYWRIGHT_E2E_HOST }}
GH_BUILD_NUMBER: ${{ github.run_id }}
MAXINSTANCES: 2

View File

@ -19,9 +19,6 @@ env:
ADMIN_PASSWORD: ${{ secrets.PIPELINE_ADMIN_PASSWORD }}
AWS_REGION: "eu-west-2"
CONTENT_CE_DIST_PATH: "./dist/content-ce"
APP_CONFIG_PROVIDER: ECM
APP_CONFIG_AUTH_TYPE: BASIC
APP_CONFIG_OAUTH2_HOST: http://localhost:4200/auth/realms/alfresco
PLAYWRIGHT_E2E_HOST: ${{ secrets.PLAYWRIGHT_E2E_HOST }}
NPM_REGISTRY_ADDRESS: ${{ secrets.NPM_REGISTRY_ADDRESS }}

View File

@ -17,13 +17,7 @@ RUN apk update && apk upgrade
USER 101
ARG PROJECT_NAME
ARG PROVIDER="ECM"
ARG AUTH_TYPE="BASIC"
ENV APP_CONFIG_PROVIDER=$PROVIDER
ENV APP_CONFIG_AUTH_TYPE=$AUTH_TYPE
ENV APP_CONFIG_OAUTH2_HOST="{protocol}//{hostname}{:port}/auth/realms/alfresco"
ENV APP_CONFIG_BPM_HOST="{protocol}//{hostname}{:port}"
ENV APP_CONFIG_ECM_HOST="{protocol}//{hostname}{:port}"

View File

@ -26,9 +26,6 @@ Create an `.env` file in the project root folder with the following content
```yml
APP_CONFIG_ECM_HOST="<URL>"
APP_CONFIG_PROVIDER=ECM
APP_CONFIG_AUTH_TYPE=BASIC
APP_CONFIG_OAUTH2_HOST=http://localhost:4200/auth/realms/alfresco
```
Where `<URL>` is the address of the ACS.

View File

@ -3,8 +3,8 @@
"ecmHost": "${APP_CONFIG_ECM_HOST}",
"aosHost": "${APP_CONFIG_ECM_HOST}/alfresco/aos",
"baseShareUrl": "${APP_CONFIG_ECM_HOST}/#/preview/s",
"providers": "${APP_CONFIG_PROVIDER}",
"authType": "${APP_CONFIG_AUTH_TYPE}",
"providers": "ECM",
"authType": "BASIC",
"loginRoute": "login",
"mobileAppSwitch": {
"enabled": true
@ -15,7 +15,7 @@
"folderRules": true
},
"oauth2": {
"host": "${APP_CONFIG_OAUTH2_HOST}",
"host": "{protocol}//{hostname}{:port}/auth/realms/alfresco",
"clientId": "alfresco",
"scope": "openid",
"secret": "",

View File

@ -5,16 +5,8 @@ set -e
eval ALL_ARGUMENTS=("BASE_PATH"
"APP_BASE_SHARE_URL"
"APP_CONFIG_IDENTITY_HOST"
"APP_CONFIG_OAUTH2_HOST"
"APP_CONFIG_BPM_HOST"
"APP_CONFIG_ECM_HOST"
"APP_CONFIG_AUTH_TYPE"
"APP_CONFIG_PROVIDER"
"APP_CONFIG_PLUGIN_MICROSOFT_ONLINE"
"APP_CONFIG_MICROSOFT_ONLINE_AUTHORITY"
"APP_CONFIG_MICROSOFT_ONLINE_CLIENTID"
"APP_CONFIG_MICROSOFT_ONLINE_OOI_URL"
"APP_CONFIG_MICROSOFT_ONLINE_REDIRECT"
)
ALL_ARGUMENTS_LENGTH=${#ALL_ARGUMENTS[@]}
DOCKER_ARGS=""

52
package-lock.json generated
View File

@ -10,10 +10,10 @@
"hasInstallScript": true,
"license": "LGPL-3.0",
"dependencies": {
"@alfresco/adf-content-services": "6.2.0",
"@alfresco/adf-core": "6.2.0",
"@alfresco/adf-extensions": "6.2.0",
"@alfresco/eslint-plugin-eslint-angular": "6.2.0",
"@alfresco/adf-content-services": "6.3.0-5466178577",
"@alfresco/adf-core": "6.3.0-5466178577",
"@alfresco/adf-extensions": "6.3.0-5466178577",
"@alfresco/eslint-plugin-eslint-angular": "6.3.0-5466178577",
"@alfresco/js-api": "6.2.0",
"@angular/animations": "14.1.3",
"@angular/cdk": "14.1.3",
@ -45,8 +45,8 @@
"zone.js": "0.11.8"
},
"devDependencies": {
"@alfresco/adf-cli": "6.2.0",
"@alfresco/adf-testing": "6.2.0",
"@alfresco/adf-cli": "6.3.0-5466178577",
"@alfresco/adf-testing": "6.3.0-5466178577",
"@angular-devkit/build-angular": "14.2.11",
"@angular-devkit/core": "14.1.2",
"@angular-devkit/schematics": "14.1.2",
@ -121,9 +121,9 @@
"dev": true
},
"node_modules/@alfresco/adf-cli": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/@alfresco/adf-cli/-/adf-cli-6.2.0.tgz",
"integrity": "sha512-9YN7YUGVqzmroed1MT/e/K+YjDdC+WtUC+ldE9lb3eC27YLN9GP1nzF42bV5yCgyRSS5fAS5xhCaouaL08XNrA==",
"version": "6.3.0-5466178577",
"resolved": "https://registry.npmjs.org/@alfresco/adf-cli/-/adf-cli-6.3.0-5466178577.tgz",
"integrity": "sha512-pCYFC7Fjm80ORddPvtnSZGb/N4VOCFmO9+8O9OpDu9+XuIg5b4+14L6EszzFRbevo/PI5RsK1/XOb2HT64h2ZA==",
"dev": true,
"dependencies": {
"@alfresco/js-api": ">=6.2.0",
@ -141,14 +141,14 @@
}
},
"node_modules/@alfresco/adf-content-services": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-6.2.0.tgz",
"integrity": "sha512-v/7GJI6yBBz0iy13PecaoyPPcvqIFRvvTnTJhVVWtKYiQEUcNoYj0BbYHtTw1EIp/Zf6qfSkyJBkwlDJvhwHDA==",
"version": "6.3.0-5466178577",
"resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-6.3.0-5466178577.tgz",
"integrity": "sha512-aaY66EpjRwC4IAyDIBkHdPM+QW/MYSFc7xtkzBPn/KRrA3LmtcxpWVVXTweCLebo8E6zMR5cp2P3Ljk9sFTB0w==",
"dependencies": {
"tslib": "^2.3.0"
},
"peerDependencies": {
"@alfresco/adf-core": ">=6.2.0",
"@alfresco/adf-core": ">=6.3.0-5466178577",
"@alfresco/js-api": ">=6.2.0",
"@angular/animations": ">=14.1.3",
"@angular/cdk": ">=14.1.2",
@ -165,9 +165,9 @@
}
},
"node_modules/@alfresco/adf-core": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-6.2.0.tgz",
"integrity": "sha512-C6oMB+Yl1XF1TAJpWRVpGDDtOVS4qtLj/UKMMdV4XVHBdGX/B2LEwQdQTfH4M10SNMitUa4qQOI4WoIA93xtMA==",
"version": "6.3.0-5466178577",
"resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-6.3.0-5466178577.tgz",
"integrity": "sha512-ke+WnpGjZNo2EdHz8lz7YEiRvy596Bp2Ca+lceMYHRvc0RxiyAsLgcoInobUDOFxouadKzDEpe/Rjo6x7WP9Eg==",
"dependencies": {
"angular-oauth2-oidc": "^13.0.1",
"angular-oauth2-oidc-jwks": "^13.0.1",
@ -175,7 +175,7 @@
"tslib": "^2.3.0"
},
"peerDependencies": {
"@alfresco/adf-extensions": ">=6.2.0",
"@alfresco/adf-extensions": ">=6.3.0-5466178577",
"@alfresco/js-api": ">=6.2.0",
"@angular/animations": ">=14.1.3",
"@angular/cdk": ">=14.1.2",
@ -194,9 +194,9 @@
}
},
"node_modules/@alfresco/adf-extensions": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-6.2.0.tgz",
"integrity": "sha512-I4oQPH6w+YXdp2MLpKtnZ/6TDb77tl0EDt90JU95k9xwYxKWKqB5cFhmmHArB6LLac6Jy2H5Prdd3RHGnLjmag==",
"version": "6.3.0-5466178577",
"resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-6.3.0-5466178577.tgz",
"integrity": "sha512-6OrkqALNNLnWhoskI4nLKiJ8Lm07KZNPr5146bLlgtSpAYop+ICvK9dE2QEeXBb0GAsTFHb56iPw2ICtjNWqcA==",
"dependencies": {
"tslib": "^2.3.0"
},
@ -207,9 +207,9 @@
}
},
"node_modules/@alfresco/adf-testing": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/@alfresco/adf-testing/-/adf-testing-6.2.0.tgz",
"integrity": "sha512-n8SXi0Q/NFW+zEXTC7Zg853IeRIIxaGHPk0yDr50/0Ho6KpaCrQHcU3hGCYzwroW5yXf15A5K4SslaC7I/mP5Q==",
"version": "6.3.0-5466178577",
"resolved": "https://registry.npmjs.org/@alfresco/adf-testing/-/adf-testing-6.3.0-5466178577.tgz",
"integrity": "sha512-Ryyw3WkqMYQREo1wU1JysgvvUxIi6G94xcIXdrdgM17UhLDIhKPPXx1SLKYrvsb1zuBPg5gTjCMtPJtZ05Rs8Q==",
"dev": true,
"dependencies": {
"@alfresco/js-api": ">=6.2.0",
@ -224,9 +224,9 @@
}
},
"node_modules/@alfresco/eslint-plugin-eslint-angular": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/@alfresco/eslint-plugin-eslint-angular/-/eslint-plugin-eslint-angular-6.2.0.tgz",
"integrity": "sha512-RBbs5bdjgeKD5ZGnIa1CojsWTWP/yfI9A/2ZJ3HC5OTqvQIcyg/HqDRoAHR4muuZP7SZmGdYDY5NBlu5/mQ3mw=="
"version": "6.3.0-5466178577",
"resolved": "https://registry.npmjs.org/@alfresco/eslint-plugin-eslint-angular/-/eslint-plugin-eslint-angular-6.3.0-5466178577.tgz",
"integrity": "sha512-/DyC2JXmv4TXPxbmJNOnlLFJx4ygzpC5AQGQOfC0b+yUpJmnjt/dvE2YZqL0ijlnlIVPunQS9YfCvhIHSizhSw=="
},
"node_modules/@alfresco/js-api": {
"version": "6.2.0",

View File

@ -7,7 +7,7 @@
"postinstall": "ngcc",
"ng": "ng",
"validate-app-config": "ajv validate -s ./node_modules/@alfresco/adf-core/app.config.schema.json -d ./app/.tmp/app.config.json --errors=text --verbose",
"assemble-app-config": "envsub --env-file ./.env --env APP_CONFIG_ECM_HOST={protocol}//{hostname}{:port} --env APP_CONFIG_PROVIDER=ECM --env APP_CONFIG_AUTH_TYPE=BASIC --env APP_CONFIG_OAUTH2_HOST=http://localhost:4200/auth/realms/alfresco --all ./app/src/app.config.json.tpl ./app/.tmp/app.config.json",
"assemble-app-config": "envsub --env-file ./.env --env APP_CONFIG_ECM_HOST={protocol}//{hostname}{:port} --all ./app/src/app.config.json.tpl ./app/.tmp/app.config.json",
"prestart": "mkdir -p ./app/.tmp && npm run assemble-app-config && npm run validate-app-config",
"start": "nx serve content-ce",
"start:prod": "npm run validate-app-config && node --max-old-space-size=8192 nx serve content-ce --configuration production",
@ -38,10 +38,10 @@
},
"private": true,
"dependencies": {
"@alfresco/adf-content-services": "6.2.0",
"@alfresco/adf-core": "6.2.0",
"@alfresco/adf-extensions": "6.2.0",
"@alfresco/eslint-plugin-eslint-angular": "6.2.0",
"@alfresco/adf-content-services": "6.3.0-5466178577",
"@alfresco/adf-core": "6.3.0-5466178577",
"@alfresco/adf-extensions": "6.3.0-5466178577",
"@alfresco/eslint-plugin-eslint-angular": "6.3.0-5466178577",
"@alfresco/js-api": "6.2.0",
"@angular/animations": "14.1.3",
"@angular/cdk": "14.1.3",
@ -73,8 +73,8 @@
"zone.js": "0.11.8"
},
"devDependencies": {
"@alfresco/adf-cli": "6.2.0",
"@alfresco/adf-testing": "6.2.0",
"@alfresco/adf-cli": "6.3.0-5466178577",
"@alfresco/adf-testing": "6.3.0-5466178577",
"@angular-devkit/build-angular": "14.2.11",
"@angular-devkit/core": "14.1.2",
"@angular-devkit/schematics": "14.1.2",

View File

@ -50,10 +50,10 @@ export interface AcaBackend {
}
const config = {
authType: process.env.APP_CONFIG_AUTH_TYPE,
authType: 'BASIC',
hostBpm: process.env.APP_CONFIG_BPM_HOST,
hostEcm: process.env.APP_CONFIG_ECM_HOST,
provider: process.env.APP_CONFIG_PROVIDER,
provider: 'ECM',
contextRoot: 'alfresco'
};