forked from OpenLiberty/archived-guide-microprofile-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: JxMGf5VUf4Wf4ql0pBO/6s1+rl88nlL069hmDO95heTlN/hE8lnAdl1afU2PYzabzI43nm0PH3ned7g/EPCUu6iYwHqGH/N2Ac18a0zUxf83nEwyVmj2sFv9C7dgxaL8ZGvC+fNm3eS4UVfYgHAqonkXyeq54tCJkyjctCarMIoFrX2Tnjxa9fKh4/SNEmqYXWbIdOChJj4ueSDadg4zurNJs6vAsuRn69OaDjI0dIfKoBHKDxbSU1lIjNepa0CggUwKx6djLue/+oJHcQg8CfFJNyPlNfMvHehP3PNO6cgqK4bRfBqBIMn5gpbAlG5gTIvZsFdcysDix13eQEmk3ZciuLMx+YIUBpP5m4sLdgAGC8NV8bE1sMTsjJJXWSrS0kPkxVE+qPAOoGIV4uyC3QXW/TGFP3/BFuq+ShRGhsf17SGaOwHBzi4ssTTYhFnORvFbYtMix+aXgTeL1lqOQiRJHnpGpmzvJGY6Gp9CfOXHTM9elCkazQ1eCYHfFaBDCOOkYV0/mJo5Ipj6s0a4dahY0PMsrOZyrM2FwXJlkunkpj47kugBTRZrO621Ls8hgW8aCnZ1xtWNaENDRC3kc3ZYJYIWQlOFRXXGa4K5oNaOacDZu5XXbu9h8qTJIAWnFp5yASC+IjcsyejaWfsc0u1klgaPI5YOLPCGvaWASMw=
on_success: never
on_failure: always
branches:
only:
- master