-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.sh
executable file
·48 lines (45 loc) · 949 Bytes
/
start.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
41
42
43
44
45
46
47
48
#!/bin/bash
set -e
usage()
{
cat << USAGE >&2
Usage:s]
-d DATABASE | --database=DATABASE Database name default
-b | --build Rebuild docker image
USAGE
exit 1
}
DATABASES="postgresql mysql mariadb sqlite cockroachdb"
BUILD=0
while [[ $# -gt 0 ]]; do
key="$1"
case $key in
-d|--database)
DATABASES="$2"
shift # past argument
shift # past value
;;
-b|--build)
BUILD=1
echo "with build"
shift # past argument
;;
*) # unknown option
usage
;;
-h|--help)
usage
;;
esac
done
for DATABASE in $DATABASES
do
CONF="docker/$DATABASE/docker-compose.yml"
echo "Testing $DATABASE"
docker-compose -p ddbench -f $CONF up django
docker-compose -p ddbench -f $CONF down
done
CONF="docker/report/docker-compose.yml"
echo "Creating graph"
docker-compose -p ddbench -f $CONF up django
docker-compose -p ddbench -f $CONF down