summaryrefslogtreecommitdiffstats
path: root/compose/stop-compose.sh
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2024-08-15 12:39:19 +0100
committerAdheli Tavares <adheli.tavares@est.tech>2024-08-26 08:21:39 +0000
commitd802fd9a6c6aaffa330a30b68f7896ffebaa4fcd (patch)
tree823eb915f6322a38477d971273a0e43713ce0d06 /compose/stop-compose.sh
parent10cf66cdd2cca12dad9f299714e6294ae35752a7 (diff)
Change default database to PostgreSQL
Issue-ID: POLICY-5118 Change-Id: I22ece93aca3cbc5e406e4942ce5255a7b7b60761 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
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}}')