diff --git a/ci.build.sh b/ci.build.sh old mode 100644 new mode 100755 index 8cd5d57..4b513c7 --- a/ci.build.sh +++ b/ci.build.sh @@ -4,7 +4,7 @@ echo " ci.build.sh == Build test image" -BASEDIR=$(dirname "$0") +BASEDIR=$(dirname $(readlink -f $0)) source $BASEDIR/set-env.sh diff --git a/ci.startup.sh b/ci.startup.sh index a286437..7b544b1 100755 --- a/ci.startup.sh +++ b/ci.startup.sh @@ -3,7 +3,7 @@ # This script controls the startup of the container environment # It can be used as an alternative to having docker-compose up started by the CI environment -BASEDIR=$(dirname "$0") +BASEDIR=$(dirname $(readlink -f $0)) source $BASEDIR/set-env.sh @@ -25,25 +25,15 @@ if [[ -z ${JAHIA_LICENSE} ]]; then fi fi -echo "$(date +'%d %B %Y - %k:%M') [JAHIA_CLUSTER_ENABLED] == Value: ${JAHIA_CLUSTER_ENABLED} ==" +echo "$(date +'%d %B %Y - %k:%M') == Cluster enabled: ${JAHIA_CLUSTER_ENABLED} ==" if [[ "${JAHIA_CLUSTER_ENABLED}" == "true" ]]; then - echo "$(date +'%d %B %Y - %k:%M') [JAHIA_CLUSTER_ENABLED] == Starting a cluster of one processing and two browsing ==" - if [[ $1 == "notests" ]]; then - docker-compose up -d --renew-anon-volumes mariadb jahia jahia-browsing-a jahia-browsing-b alfresco dockerldap - else - docker-compose up --renew-anon-volumes -d mariadb jahia jahia-browsing-a jahia-browsing-b alfresco dockerldap - docker ps -a - docker stats --no-stream - docker-compose up --abort-on-container-exit cypress - fi -else - echo "$(date +'%d %B %Y - %k:%M') [JAHIA_CLUSTER_ENABLED] == Starting a single processing node (no cluster) ==" - if [[ $1 == "notests" ]]; then - docker-compose up -d --renew-anon-volumes mariadb jahia alfresco dockerldap - else - docker-compose up --renew-anon-volumes -d mariadb jahia alfresco dockerldap - docker ps -a - docker stats --no-stream - docker-compose up --abort-on-container-exit cypress - fi + export CLUSTER_PROFILE="--profile cluster" +fi + +echo "$(date +'%d %B %Y - %k:%M') == Starting environment ==" +docker-compose up -d --renew-anon-volumes ${CLUSTER_PROFILE} +if [[ "$1" != "notests" ]]; then + docker ps -a + docker stats --no-stream + docker-compose up --abort-on-container-exit cypress fi diff --git a/env.debug.sh b/env.debug.sh old mode 100644 new mode 100755 index 0b06c07..df22c3b --- a/env.debug.sh +++ b/env.debug.sh @@ -2,7 +2,7 @@ # This script can be used to warmup the environment and execute the tests # It is used by the docker image at startup -BASEDIR=$(dirname "$0") +BASEDIR=$(dirname $(readlink -f $0)) bash $BASEDIR/env.provision.sh diff --git a/env.provision.sh b/env.provision.sh old mode 100644 new mode 100755 index 986452f..d8ca757 --- a/env.provision.sh +++ b/env.provision.sh @@ -2,7 +2,7 @@ # This script can be used to warmup the environment and execute the tests # It is used by the docker image at startup -BASEDIR=$(dirname "$0") +BASEDIR=$(dirname $(readlink -f $0)) source $BASEDIR/set-env.sh diff --git a/env.run.sh b/env.run.sh old mode 100644 new mode 100755 index f82899e..95b376d --- a/env.run.sh +++ b/env.run.sh @@ -2,7 +2,7 @@ # This script can be used to warmup the environment and execute the tests # It is used by the docker image at startup -BASEDIR=$(dirname "$0") +BASEDIR=$(dirname $(readlink -f $0)) bash $BASEDIR/env.provision.sh diff --git a/package.json b/package.json index 531cec7..5ac9dc7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@jahia/cypress", - "version": "3.14.0", + "version": "3.14.1", "scripts": { "build": "tsc", "lint": "eslint src -c .eslintrc.json --ext .ts" @@ -8,8 +8,8 @@ "bin": { "ci.build": "./ci.build.sh", "ci.startup": "./ci.startup.sh", - "env.run": "./ci.startup.sh", - "env.debug": "./ci.startup.sh" + "env.run": "./env.run.sh", + "env.debug": "./env.debug.sh" }, "main": "dist/index.js", "types": "dist/index.d.ts",