forked from eventuate-tram/eventuate-tram-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_build-and-test-all.sh
executable file
·40 lines (22 loc) · 1.43 KB
/
_build-and-test-all.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#! /bin/bash
set -e
. ./set-env-${DATABASE}-${MODE}-${BROKER}.sh
./gradlew $* testClasses
docker-compose -f docker-compose-${DATABASE}-${MODE}-${BROKER}.yml down -v --remove-orphans
docker-compose -f docker-compose-${DATABASE}-${MODE}-${BROKER}.yml up --build -d ${DATABASE} ${BROKER} ${COORDINATOR}
./wait-for-${DATABASE}.sh
docker-compose -f docker-compose-${DATABASE}-${MODE}-${BROKER}.yml up --build -d
./wait-for-services.sh $DOCKER_HOST_IP "actuator/health" 8099
./gradlew cleanTest build
if [[ "${DATABASE}" == "mysql" ]] && [[ "${BROKER}" == "kafka" ]]; then
docker-compose -f docker-compose-${DATABASE}-${MODE}-${BROKER}.yml stop cdc-service
docker-compose -f docker-compose-${DATABASE}-${MODE}-${BROKER}.yml rm -f cdc-service
export EVENTUATE_DATABASE_SCHEMA=custom
docker-compose -f docker-compose-${DATABASE}-${MODE}-${BROKER}.yml up --build -d cdc-service
./wait-for-services.sh $DOCKER_HOST_IP "actuator/health" 8099
./gradlew waitForCdc
export TEST_CUSTOM_DB=true
./gradlew cleanTest :eventuate-tram-db-broker-integration-test:test --tests "io.eventuate.tram.broker.db.integrationtests.TramIntegrationCustomDBTest"
./gradlew cleanTest :eventuate-tram-commands-db-broker-integration-test:test --tests "io.eventuate.tram.commands.db.broker.integrationtests.TramCommandsDBBrokerIntegrationCustomDBTest"
fi
docker-compose -f docker-compose-${DATABASE}-${MODE}-${BROKER}.yml down -v --remove-orphans