mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA-2755] SSO: Simplify changing alfresco-js-api (#1290)
* include alfresco-js-api * provide update submodules as reset for the submodules
This commit is contained in:
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "alfresco-js-api"]
|
||||||
|
path = alfresco-js-api
|
||||||
|
url = https://github.com/Alfresco/alfresco-js-api
|
1
alfresco-js-api
Submodule
1
alfresco-js-api
Submodule
Submodule alfresco-js-api added at a7e88e5526
2
init-submodules.sh
Executable file
2
init-submodules.sh
Executable file
@@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
git submodule update --init
|
@@ -11,6 +11,7 @@
|
|||||||
"build.extensions": "npm run build:aos-extension",
|
"build.extensions": "npm run build:aos-extension",
|
||||||
"build.app": "node --max-old-space-size=8192 node_modules/@angular/cli/bin/ng build app",
|
"build.app": "node --max-old-space-size=8192 node_modules/@angular/cli/bin/ng build app",
|
||||||
"build": "npm run validate-config && npm run build.shared && npm run build.extensions && npm run build.app -- --prod",
|
"build": "npm run validate-config && npm run build.shared && npm run build.extensions && npm run build.app -- --prod",
|
||||||
|
"build.js-api": "./init-submodules.sh && ./scripts/install-local-js-api.sh && npm run build",
|
||||||
"build.e2e": "npm run build.shared && npm run build.extensions && npm run build.app -- --prod --configuration=e2e",
|
"build.e2e": "npm run build.shared && npm run build.extensions && npm run build.app -- --prod --configuration=e2e",
|
||||||
"test": "ng test app --code-coverage",
|
"test": "ng test app --code-coverage",
|
||||||
"test:ci": "npm run build.shared && npm run build.extensions && ng test adf-office-services-ext --watch=false && ng test app --code-coverage --watch=false",
|
"test:ci": "npm run build.shared && npm run build.extensions && ng test adf-office-services-ext --watch=false && ng test app --code-coverage --watch=false",
|
||||||
|
8
scripts/install-local-js-api.sh
Executable file
8
scripts/install-local-js-api.sh
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
rm -rf node_modules
|
||||||
|
./alfresco-js-api/scripts/build.sh
|
||||||
|
npm install
|
||||||
|
rm -rf node_modules/@alfresco/js-api
|
||||||
|
mkdir -p node_modules/@alfresco/js-api
|
||||||
|
cp -rf alfresco-js-api/dist/package/* node_modules/@alfresco/js-api
|
18
start-sso.sh
18
start-sso.sh
@@ -1,18 +0,0 @@
|
|||||||
export HOST_IP=$(ifconfig | grep -E "([0-9]{1,3}\.){3}[0-9]{1,3}" | grep -v 127.0.0.1 | awk '{ print $2 }' | cut -f2 -d: | head -n1)
|
|
||||||
export APP_URL="http://${HOST_IP}:8080"
|
|
||||||
|
|
||||||
export APP_CONFIG_AUTH_TYPE="OAUTH"
|
|
||||||
export APP_CONFIG_OAUTH2_HOST="http://${HOST_IP}:8085/auth/realms/alfresco"
|
|
||||||
export APP_CONFIG_OAUTH2_CLIENTID="alfresco"
|
|
||||||
export APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI="${APP_URL}/assets/silent-refresh.html"
|
|
||||||
export APP_CONFIG_OAUTH2_REDIRECT_LOGIN="/"
|
|
||||||
export APP_CONFIG_OAUTH2_REDIRECT_LOGOUT="/logout"
|
|
||||||
|
|
||||||
docker-compose -f docker-compose-keycloak.yml up -d --build
|
|
||||||
|
|
||||||
echo "Waiting for the app..."
|
|
||||||
npm run wait:app
|
|
||||||
|
|
||||||
echo "HOST_IP: ${HOST_IP}"
|
|
||||||
echo "Realm: ${APP_CONFIG_OAUTH2_HOST}"
|
|
||||||
echo "Content Workspace: ${APP_URL}"
|
|
2
start.sh
2
start.sh
@@ -70,7 +70,7 @@ if [[ $KEYCLOAK == "true" ]]; then
|
|||||||
export APP_CONFIG_OAUTH2_CLIENTID="alfresco"
|
export APP_CONFIG_OAUTH2_CLIENTID="alfresco"
|
||||||
export APP_CONFIG_OAUTH2_IMPLICIT_FLOW=true
|
export APP_CONFIG_OAUTH2_IMPLICIT_FLOW=true
|
||||||
export APP_CONFIG_OAUTH2_SILENT_LOGIN=true
|
export APP_CONFIG_OAUTH2_SILENT_LOGIN=true
|
||||||
export APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI="${APP_URL}assets/silent-refresh.html"
|
export APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI="${APP_URL}/assets/silent-refresh.html"
|
||||||
export APP_CONFIG_OAUTH2_REDIRECT_LOGIN="/$URL_FRAGMENT/"
|
export APP_CONFIG_OAUTH2_REDIRECT_LOGIN="/$URL_FRAGMENT/"
|
||||||
export APP_CONFIG_OAUTH2_REDIRECT_LOGOUT="/$URL_FRAGMENT/logout"
|
export APP_CONFIG_OAUTH2_REDIRECT_LOGOUT="/$URL_FRAGMENT/logout"
|
||||||
# export APP_BASE_SHARE_URL="${APP_URL}#/preview/s"
|
# export APP_BASE_SHARE_URL="${APP_URL}#/preview/s"
|
||||||
|
14
update-submodules.sh
Executable file
14
update-submodules.sh
Executable file
@@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
git pull
|
||||||
|
git submodule sync --recursive
|
||||||
|
git submodule update --init --recursive
|
||||||
|
# Go through all of the submodules switching them to their branches and updating them
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Updating alfresco-js-api ..."
|
||||||
|
echo --------------------------
|
||||||
|
cd alfresco-js-api && git checkout master && git pull
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
echo
|
Reference in New Issue
Block a user