forked from OpenLiberty/guide-maven-multimodules
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
28 lines (28 loc) · 1.19 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
language: java
before_script:
- unset _JAVA_OPTIONS
- cd finish
- chmod +x ../scripts/travisTest.sh
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"; \
echo -e "\033[1;34m Open Liberty release:\033[0m\033[1;36m $release \033[0m \n"; \
echo -e "\033[1;34m Open Liberty build number:\033[0m\033[1;36m $number \033[0m \n"; \
echo -e "\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;
- serverlogsarchive="$repo_name-$TRAVIS_BUILD_NUMBER-$result.zip";
- zip -r "$serverlogsarchive" .;
- curl -H "$JFROG_TOKEN" -T "$serverlogsarchive" "https://na.artifactory.swg-devops.com/artifactory/hyc-openliberty-guides-files-generic-local/";
branches:
only:
- master
- qa