mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
ACA-2755 sso simplified ADF integrating (#1295)
* Simplify ADF changing
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,3 +1,6 @@
|
|||||||
[submodule "alfresco-js-api"]
|
[submodule "alfresco-js-api"]
|
||||||
path = alfresco-js-api
|
path = alfresco-js-api
|
||||||
url = https://github.com/Alfresco/alfresco-js-api
|
url = https://github.com/Alfresco/alfresco-js-api
|
||||||
|
[submodule "alfresco-ng2-components"]
|
||||||
|
path = alfresco-ng2-components
|
||||||
|
url = https://github.com/Alfresco/alfresco-ng2-components
|
||||||
|
1
alfresco-ng2-components
Submodule
1
alfresco-ng2-components
Submodule
Submodule alfresco-ng2-components added at 20a4442612
@@ -12,6 +12,7 @@
|
|||||||
"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.js-api": "./init-submodules.sh && ./scripts/install-local-js-api.sh && npm run build",
|
||||||
|
"build.adf": "./init-submodules.sh && ./scripts/install-local-adf.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",
|
||||||
@@ -21,7 +22,7 @@
|
|||||||
"e2e": "npm run wd:update && protractor --baseUrl=${TEST_BASE_URL:-http://localhost:8080/content-app} $SUITE",
|
"e2e": "npm run wd:update && protractor --baseUrl=${TEST_BASE_URL:-http://localhost:8080/content-app} $SUITE",
|
||||||
"e2e.local": "npm run wd:update && protractor --baseUrl=http://localhost:4200 $SUITE",
|
"e2e.local": "npm run wd:update && protractor --baseUrl=http://localhost:4200 $SUITE",
|
||||||
"wait:app": "wait-on http://${HOST_IP:-localhost}:${HOST_PORT:-8080}/alfresco/ -t 1000000 && wait-on http://${HOST_IP:-localhost}:${HOST_PORT:-8080}/content-app/ -t 400000",
|
"wait:app": "wait-on http://${HOST_IP:-localhost}:${HOST_PORT:-8080}/alfresco/ -t 1000000 && wait-on http://${HOST_IP:-localhost}:${HOST_PORT:-8080}/content-app/ -t 400000",
|
||||||
"start:docker": "./start.sh && npm run wait:app",
|
"start:docker": "./start.sh",
|
||||||
"stop:docker": "./start.sh -d",
|
"stop:docker": "./start.sh -d",
|
||||||
"e2e:docker": "./start.sh && npm run e2e && ./start.sh -d",
|
"e2e:docker": "./start.sh && npm run e2e && ./start.sh -d",
|
||||||
"spellcheck": "cspell '{src,e2e,projects}/**/*.ts'",
|
"spellcheck": "cspell '{src,e2e,projects}/**/*.ts'",
|
||||||
|
17
scripts/install-local-adf.sh
Executable file
17
scripts/install-local-adf.sh
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cd alfresco-ng2-components
|
||||||
|
npm install
|
||||||
|
./scripts/build/build-all-lib.sh
|
||||||
|
./scripts/build/build-content-services.sh
|
||||||
|
./scripts/build/build-extensions.sh
|
||||||
|
cd ..
|
||||||
|
rm -rf node_modules/@alfresco/adf-content-services
|
||||||
|
rm -rf node_modules/@alfresco/adf-core
|
||||||
|
rm -rf node_modules/@alfresco/adf-extensions
|
||||||
|
mkdir -p node_modules/@alfresco/adf-content-services
|
||||||
|
mkdir -p node_modules/@alfresco/adf-core
|
||||||
|
mkdir -p node_modules/@alfresco/adf-extensions
|
||||||
|
cp -rf alfresco-ng2-components/lib/dist/content-services/* node_modules/@alfresco/adf-content-services
|
||||||
|
cp -rf alfresco-ng2-components/lib/dist/core/* node_modules/@alfresco/adf-core
|
||||||
|
cp -rf alfresco-ng2-components/lib/dist/extensions/* node_modules/@alfresco/adf-extensions
|
15
start.sh
15
start.sh
@@ -8,6 +8,7 @@ show_help() {
|
|||||||
echo "-hi or --host-ip set the host ip"
|
echo "-hi or --host-ip set the host ip"
|
||||||
echo "-hp or --host-port set the host port. Default 8080"
|
echo "-hp or --host-port set the host port. Default 8080"
|
||||||
echo "-w or --wait wait for backend. Default true"
|
echo "-w or --wait wait for backend. Default true"
|
||||||
|
echo "-aca. Only redeploy ACA and skip the other docker compose services"
|
||||||
echo "-h or --help"
|
echo "-h or --help"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -32,18 +33,24 @@ set_wait(){
|
|||||||
WAIT=$1
|
WAIT=$1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
redeploy_aca(){
|
||||||
|
REDEPLOY_ACA="true"
|
||||||
|
}
|
||||||
|
|
||||||
# Defaults
|
# Defaults
|
||||||
WAIT="true"
|
WAIT="true"
|
||||||
SET_HOST_IP=""
|
SET_HOST_IP=""
|
||||||
HOST_PORT="8080"
|
HOST_PORT="8080"
|
||||||
KEYCLOAK="false"
|
KEYCLOAK="false"
|
||||||
AIMS_PROPS=""
|
AIMS_PROPS=""
|
||||||
|
REDEPLOY_ACA="false"
|
||||||
|
|
||||||
while [[ $1 == -* ]]; do
|
while [[ $1 == -* ]]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h|--help|-\?) show_help; exit 0;;
|
-h|--help|-\?) show_help; exit 0;;
|
||||||
-k|--keycloak) set_keycloak; shift;;
|
-k|--keycloak) set_keycloak; shift;;
|
||||||
-d|--down) down; shift;;
|
-d|--down) down; shift;;
|
||||||
|
-aca) redeploy_aca; shift;;
|
||||||
-w|--wait) set_wait $2; shift 2;;
|
-w|--wait) set_wait $2; shift 2;;
|
||||||
-hi|--host-ip) set_host_ip $2; shift 2;;
|
-hi|--host-ip) set_host_ip $2; shift 2;;
|
||||||
-hp|--host-port) set_host_port $2; shift 2;;
|
-hp|--host-port) set_host_port $2; shift 2;;
|
||||||
@@ -78,9 +85,15 @@ if [[ $KEYCLOAK == "true" ]]; then
|
|||||||
AIMS_PROPS="-Dauthentication.chain=identity-service1:identity-service,alfrescoNtlm1:alfrescoNtlm"
|
AIMS_PROPS="-Dauthentication.chain=identity-service1:identity-service,alfrescoNtlm1:alfrescoNtlm"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Start docker compose"
|
|
||||||
export AIMS_PROPS=${AIMS_PROPS}
|
export AIMS_PROPS=${AIMS_PROPS}
|
||||||
|
|
||||||
|
if [[ $REDEPLOY_ACA == "true" ]]; then
|
||||||
|
echo "Redeploy content-app"
|
||||||
|
docker-compose up --detach --build content-app
|
||||||
|
else
|
||||||
|
echo "Start docker compose"
|
||||||
docker-compose up -d --build
|
docker-compose up -d --build
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $WAIT == "true" ]]; then
|
if [[ $WAIT == "true" ]]; then
|
||||||
echo "http://${HOST_IP:-localhost}:${HOST_PORT:-8080}/$URL_FRAGMENT/"
|
echo "http://${HOST_IP:-localhost}:${HOST_PORT:-8080}/$URL_FRAGMENT/"
|
||||||
|
@@ -12,3 +12,7 @@ cd alfresco-js-api && git checkout master && git pull
|
|||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
echo "Updating alfresco-ng2-components ..."
|
||||||
|
echo --------------------------
|
||||||
|
cd alfresco-ng2-components && git checkout master && git pull
|
||||||
|
cd ..
|
||||||
|
Reference in New Issue
Block a user