Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script fixes, use docker profiles #40

Merged
merged 4 commits into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci.build.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

echo " ci.build.sh == Build test image"

BASEDIR=$(dirname "$0")
BASEDIR=$(dirname $(readlink -f $0))

source $BASEDIR/set-env.sh

Expand Down
32 changes: 11 additions & 21 deletions ci.startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
2 changes: 1 addition & 1 deletion env.debug.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion env.provision.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion env.run.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@jahia/cypress",
"version": "3.14.0",
"version": "3.14.1",
"scripts": {
"build": "tsc",
"lint": "eslint src -c .eslintrc.json --ext .ts"
},
"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",
Expand Down
Loading