-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
83 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
if [ -z "$DOCKER_COMPOSE" ]; then | ||
echo setting DOCKER_COMPOSE | ||
export DOCKER_COMPOSE="docker-compose -f docker-compose-postgres.yml -f docker-compose-cdc-postgres.yml" | ||
else | ||
echo using existing DOCKER_COMPOSE = $DOCKER_COMPOSE | ||
fi | ||
|
||
export GRADLE_OPTIONS="-P excludeCdcLibs=true" | ||
|
||
./gradlew $GRADLE_OPTIONS $* :eventuate-tram-cdc-mysql-service:clean :eventuate-tram-cdc-mysql-service:assemble | ||
|
||
. ./set-env-postgres.sh | ||
|
||
$DOCKER_COMPOSE stop | ||
$DOCKER_COMPOSE rm --force -v | ||
|
||
$DOCKER_COMPOSE build | ||
$DOCKER_COMPOSE up -d postgres | ||
|
||
./wait-for-postgres.sh | ||
|
||
$DOCKER_COMPOSE up -d | ||
|
||
./gradlew $GRADLE_OPTIONS :eventuate-tram-mysql-kafka-integration-test:cleanTest :eventuate-tram-mysql-kafka-integration-test:test | ||
|
||
$DOCKER_COMPOSE stop | ||
$DOCKER_COMPOSE rm --force -v | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#! /bin/bash | ||
|
||
set -e | ||
|
||
. ./set-env-postgres.sh | ||
|
||
docker-compose -f docker-compose-postgres.yml down -v | ||
|
||
docker-compose -f docker-compose-postgres.yml up -d | ||
|
||
./wait-for-postgres.sh | ||
|
||
./gradlew build | ||
|
||
docker-compose -f docker-compose-postgres.yml down -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,8 @@ docker-compose down -v | |
|
||
docker-compose up -d | ||
|
||
./wait-for-mysql.sh | ||
|
||
./gradlew build | ||
|
||
docker-compose down -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#! /bin/bash -e | ||
|
||
docker run -it \ | ||
docker run $* \ | ||
--name mysqlterm --link $(echo ${PWD##*/} | sed -e 's/-//g')_mysql_1:mysql --rm mysql:5.7.13 \ | ||
sh -c 'exec mysql -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD" eventuate' | ||
sh -c 'exec mysql -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD" -o eventuate' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#! /bin/bash -e | ||
|
||
docker run $* \ | ||
--name postgresterm --link $(echo ${PWD##*/} | sed -e 's/-//g')_postgres_1:postgres --rm postgres:9.6.5 \ | ||
sh -c 'export PGPASSWORD="$POSTGRES_ENV_POSTGRES_PASSWORD"; exec psql -h postgres -U "$POSTGRES_ENV_POSTGRES_USER" ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#! /bin/sh | ||
|
||
until (echo select 1 from dual | ./mysql-cli.sh -i > /dev/null) | ||
do | ||
echo sleeping for mysql | ||
sleep 5 | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#! /bin/sh | ||
|
||
until (echo select 1 | ./postgres-cli.sh -i > /dev/null) | ||
do | ||
echo sleeping for postgres | ||
sleep 5 | ||
done |