-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathtest.sh
executable file
·36 lines (29 loc) · 1.05 KB
/
test.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
#!/usr/bin/env bash
set -eu
set -o pipefail
JVERSION="$(java --version 2>/dev/null | head -1 | cut -d' ' -f2 | cut -d'.' -f1)" || {
echo "Seems this Java doesn't know --version option, use Java 11 or newer."
exit 1
}
[[ "$JVERSION" -lt "11" ]] &&
echo "Java version should be 11 or newer, is \"$JVERSION\", but we'll try anyway"
. ./test-setenv.sh
if [ -z "$POSTGRES_JDBC_URL" ]; then
echo "Please set POSTGRES_JDBC_URL environment variable in test-setenv.sh"
exit 1
fi
if [ -z "$POSTGRES_JDBC_USERNAME" ]; then
echo "Please set POSTGRES_JDBC_USERNAME environment variable in test-setenv.sh"
exit 1
fi
if [ -z "$POSTGRES_JDBC_PASSWORD" ]; then
echo "Please set POSTGRES_JDBC_PASSWORD environment variable in test-setenv.sh"
exit 1
fi
./mvnw clean install
./mvnw -f samples-test clean package \
-Duser.language=en \
-Dmidpoint.repository.jdbcUrl=$POSTGRES_JDBC_URL \
-Dmidpoint.repository.jdbcUsername=$POSTGRES_JDBC_USERNAME \
-Dmidpoint.repository.jdbcPassword=$POSTGRES_JDBC_PASSWORD \
-Dtest.config.file=test-config-new-repo.xml