-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
34 lines (34 loc) · 1.33 KB
/
.travis.yml
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
language: java
dist: precise
addons:
mariadb: '10.0'
jdk:
- openjdk13
install: True
before_script:
- sudo mysql --user root < /home/travis/build/Warkdev/account-service/scripts/database/structure.sql
- sudo mysql --user root auth < /home/travis/build/Warkdev/account-service/scripts/database/data.sql
- unset _JAVA_OPTIONS
- chmod +x scripts/travisTest.sh
- mv scripts/liberty src/main
- echo "MAVEN_OPTS='-Xmx2g'" > ~/.mavenrc
script:
- scripts/travisTest.sh
after_script:
- logsPath=$(find . -name "console.log" | sed "s/console.log//g");
- build=$(grep "Open Liberty" $logsPath/console.log | cut -d" " -f5 | cut -d")" -f1 );
- release=$( echo "$build" | cut -d'/' -f1);
- number=$(echo "$build" | cut -d'/' -f2);
- ol_jv=$(grep -i "version" $logsPath/console.log);
- jv=$(printf '%s\n' "${ol_jv//$' on '/$'\n'}" | sed '2q;d');
- echo -e "\n"\
"\033[1;34m Open Liberty release:\033[0m\033[1;36m $release \033[0m \n"\
"\033[1;34m Open Liberty build number:\033[0m\033[1;36m $number \033[0m \n"\
"\033[1;34m Java version:\033[0m\033[1;36m $jv \033[0m \n"
- cd $logsPath;
- repo_name=$(echo "$TRAVIS_REPO_SLUG" | sed -e "s/\//-/g");
- if [ "$TRAVIS_TEST_RESULT" -eq 0 ]; then RESULT="passed"; else RESULT="failed"; fi;
- echo -e "\033[1;34m result:\033[0m\033[1;36m $RESULT \033[0m \n"
branches:
only:
- main