diff --git a/.gitmodules b/.gitmodules index 8278f1344..dbbfe7e84 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "alfresco-js-api"] path = 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 diff --git a/alfresco-ng2-components b/alfresco-ng2-components new file mode 160000 index 000000000..20a444261 --- /dev/null +++ b/alfresco-ng2-components @@ -0,0 +1 @@ +Subproject commit 20a444261248efafb0e3df323c7e1753dce4dbb1 diff --git a/package.json b/package.json index 625f35d16..95bc3fcaf 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "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.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", "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", @@ -21,7 +22,7 @@ "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", "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", "e2e:docker": "./start.sh && npm run e2e && ./start.sh -d", "spellcheck": "cspell '{src,e2e,projects}/**/*.ts'", diff --git a/scripts/install-local-adf.sh b/scripts/install-local-adf.sh new file mode 100755 index 000000000..1af52ddcb --- /dev/null +++ b/scripts/install-local-adf.sh @@ -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 diff --git a/start.sh b/start.sh index 7beafa428..38ad7c1fe 100755 --- a/start.sh +++ b/start.sh @@ -8,6 +8,7 @@ show_help() { echo "-hi or --host-ip set the host ip" echo "-hp or --host-port set the host port. Default 8080" 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" } @@ -32,18 +33,24 @@ set_wait(){ WAIT=$1 } +redeploy_aca(){ + REDEPLOY_ACA="true" +} + # Defaults WAIT="true" SET_HOST_IP="" HOST_PORT="8080" KEYCLOAK="false" AIMS_PROPS="" +REDEPLOY_ACA="false" while [[ $1 == -* ]]; do case "$1" in -h|--help|-\?) show_help; exit 0;; -k|--keycloak) set_keycloak; shift;; -d|--down) down; shift;; + -aca) redeploy_aca; shift;; -w|--wait) set_wait $2; shift 2;; -hi|--host-ip) set_host_ip $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" fi -echo "Start docker compose" export AIMS_PROPS=${AIMS_PROPS} -docker-compose up -d --build + +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 +fi if [[ $WAIT == "true" ]]; then echo "http://${HOST_IP:-localhost}:${HOST_PORT:-8080}/$URL_FRAGMENT/" diff --git a/update-submodules.sh b/update-submodules.sh index 69a420d24..a0335e740 100755 --- a/update-submodules.sh +++ b/update-submodules.sh @@ -12,3 +12,7 @@ cd alfresco-js-api && git checkout master && git pull cd .. echo +echo "Updating alfresco-ng2-components ..." +echo -------------------------- +cd alfresco-ng2-components && git checkout master && git pull +cd ..