Skip to content

Commit

Permalink
[ACA-4715] upgrade to latest ADF alphas and cleanup env vars (#3312)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
DenysVuika authored Jul 5, 2023
1 parent 46ed7a8 commit 6b003ef
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 67 deletions.
3 changes: 0 additions & 3 deletions .github/actions/run-e2e-playwright/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 &\
Expand Down
3 changes: 0 additions & 3 deletions .github/actions/run-e2e/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 &\
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
6 changes: 0 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions app/src/app.config.json.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -15,7 +15,7 @@
"folderRules": true
},
"oauth2": {
"host": "${APP_CONFIG_OAUTH2_HOST}",
"host": "{protocol}//{hostname}{:port}/auth/realms/alfresco",
"clientId": "alfresco",
"scope": "openid",
"secret": "",
Expand Down
8 changes: 0 additions & 8 deletions docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=""
Expand Down
52 changes: 26 additions & 26 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions projects/aca-playwright-shared/src/api/api-client-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
};

Expand Down

0 comments on commit 6b003ef

Please sign in to comment.