forked from OpenLiberty/guide-cdi-intro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
33 lines (33 loc) · 2.22 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
language: java
before_script:
- unset _JAVA_OPTIONS
- cd finish
script:
- mvn clean install
- serverName=$(target/liberty/wlp/bin/server list | cut -d '.' -f2| tr -d '\n');
- build=$(grep "Open Liberty" target/liberty/wlp/usr/servers/"$serverName"/logs/console.log
| cut -d' ' -f5 | cut -d')' -f1 ); release=$( echo "$build" | cut -d'/' -f1); number=$(
echo "$build" | cut -d'/' -f2); ol_jv=$(grep -i "on java" target/liberty/wlp/usr/servers/"$serverName"/logs/console.log);
jv=$(printf '%s\n' "${ol_jv//$' on '/$'\n'}" | sed '2q;d'); echo -e "\n"; echo -e "\033[1;34mOpen
Liberty release:\033[0m \033[1;36m$release\033[0m"; echo -e "\033[1;34mOpen Liberty
build number:\033[0m \033[1;36m$number\033[0m"; echo -e "\033[1;34mJava version:\033[0m
\033[1;36m$jv\033[0m";
- cd target/liberty/wlp/usr/servers/"$serverName"/logs/; 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/";
notifications:
slack:
template:
- 'Build: <%{build_url}| %{build_number}> | Commit (<%{compare_url}|%{commit}>):
%{commit_message}'
- 'Repo@Branch: %{repository_slug}@%{branch}'
- 'Author: %{author}'
- 'Summary: %{result} in %{duration}'
rooms:
secure: hhm22nV6fa1Cej9xUeYVWA6zEsl5E9eVi3r2fHySuWHiHwICkHBCkogQEziWq/rmCwb/JROWiAou6Xb57BeAuuSTMK1nU96FZzdWoUOxr/TMOCDBYd4uyQ3Xsuo5QS707GnjnhniHNRVXg6RuJ3WLpLkyAQdbLAHcgzm/7pCFuAWg6CRSC5tyOl4TswaNXZWaF4iAXzifNsPdVHx9x6Msv1/yWOhP/6LlyBkQ0qb9YNq3SwY5wKsLG9gqfoncs+Jlg98Yu6c2EilD0BiCwUXe/rltT6RSmBe2hKNQ6SV1viA8VS+9juPYB0s9mOWNpPd4fqMTA+aiD3W83o7HjktPfc6JNIZDz4pktzjWSYFLftVmk0f2r2Vy1KusPQBxX1W8rsNUyCFnbiw4z0q84ARH5dVc1sIizCswwvICRCDgyp5gWrZZjxIHr28UIGfYiDultltuSOc6wrq7cDeh8ntjhQX4T9FtamgdsoM/p4CFzWZqNspJHekyXAVopgoR30qH/U7GhvQS8azjOPqSCZVaymQSo4Jg0C/Sc4QQ0dhc9Xd0KAycX+LH/2mE1YNJb363iLQHeoLXRcZdCGXN/Yncmc/auZhq7YIhdfo0GBEgbYxG5QMTklBIsFopXiozoQzrfCl+s1KAC9T7bcZOcHEcSy3534/stAyStcGMYonSc4=
on_success: never
on_failure: always
branches:
only:
- master