summaryrefslogtreecommitdiffstats
path: root/compose/stop-compose.sh
diff options
context:
space:
mode:
Diffstat (limited to 'compose/stop-compose.sh')
-rwxr-xr-xcompose/stop-compose.sh34
1 files changed, 26 insertions, 8 deletions
diff --git a/compose/stop-compose.sh b/compose/stop-compose.sh
index 493f9b57..5811a3e1 100755
--- a/compose/stop-compose.sh
+++ b/compose/stop-compose.sh
@@ -24,14 +24,30 @@ if [ -z "${WORKSPACE}" ]; then
export WORKSPACE
fi
-# always 'docker' if running docker compose
-export TEST_ENV="docker"
-
-# docker compose fails when not running CSIT
-if [ -z "$ROBOT_LOG_DIR" ]; then
- export ROBOT_LOG_DIR=/tmp/
- export ROBOT_FILES=none
- export PROJECT=api
+database=postgres
+
+while [[ $# -gt 0 ]]
+do
+ key="$1"
+
+ case $key in
+ --mariadb)
+ database=mariadb
+ shift
+ ;;
+ --postgres)
+ database=postgres
+ shift
+ ;;
+ *)
+ component="$1"
+ shift
+ ;;
+ esac
+done
+
+if [ -z "$component" ]; then
+ export component=api
fi
COMPOSE_FOLDER="${WORKSPACE}"/compose
@@ -44,6 +60,8 @@ source get-versions.sh > /dev/null 2>&1
echo "Collecting logs from docker compose containers..."
rm -rf *.log
+#COMPOSE_FILES="-f compose.${database}.yml -f compose.pdp.scale.yml -f compose.acm.scale.yml"
+
# this will collect logs by service instead of mixing all together
containers=$(docker compose ps --all --format '{{.Service}}')