forked from OpenLiberty/guide-rest-intro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
36 lines (36 loc) · 2.27 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
35
36
language: java
before_script:
- unset _JAVA_OPTIONS
- cd finish
- chmod +x ../scripts/travisTest.sh
script:
- ../scripts/travisTest.sh
- 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 "version" 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: osJ1BpDrO19/9es/FCOQ4doXMbQ2ntuhbVheJWsgJf8+1HC7zYPTJkPiwKW3Jxt5QCXBHjk6HhbO+Vp8kr8J4DLJOzE2sGstWny8BzB2asvVLcJDqT9osKbNI7gF6jY61s8DPM3n7AIl8JYtLfwkfidhAxmtgN04zNKQMxr1h0mGBDk1NKV0gZHv3TAQqCJLS56YdnjIu8Ig52Ud0VA2F1hgrOpwPEhwYAMG++IkZr3Scm5QGYvoloQjXzBKKaQA4eb6KkvvA/79qCaH+3A0mE+hZAN5IADzF21O6eC9li5Xy9+iOL84YW2Sb+co/WvYLPzKu7lWGpiQ311UtKvX2u7/tKtlpSTOeK7QhdDT2AzgcoeVJKf2w7Q7x0GJmypVrzCDIon9bBw4YAXwbj1jkJUCm9xDXIXJ7cQl2JtfdM4K4NNT6GZoLNr94cJHcI1VeFdg/e8GTfcqjSAAcjo7fmkSKp5q+Y4V0JFdtdQvxZ5Rm/4gZRW6qMzNzXGWbkogw6CAh8uVyhRDiGNTGLKm0RwFNyYoWL6GsyMBrbpDP0NqWCOhXNLEyHGdvahuJOMNuaa9Al+BltxTgY6M+KXg31mdZL5fhCx9Z3gna32X7uuSRvWT5SvMzgTqPG+cSPrzoEyLpGMfrDOjjhLHFbOcqIU1uxZF55nXMgNVaO3HbFk=
on_success: never
on_failure: always
branches:
only:
- master
- qa