forked from OpenLiberty/guide-rest-client-java
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
40 lines (40 loc) · 2.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
29
30
31
32
33
34
35
36
37
38
39
40
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/";
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: XbNXWScUdU3dx6ZP7nWJHcrTHL4904fqhQFsrFuQ+wIigZeN1SU0TJ6aN+H1oji6Oew/XT/ezg3YkcBLony9h8a+vNCuotx3uRv1HNEPbjeJFGFsoxRSgjBna1WMibIcTRhm8bsQOBgJILulNZa0qPFmF+lI9KehYVWb3plHmNUMIrVtOWgW0IkqeLCD12FUtOsY9W2RytoGv5g60XP4o/rwKI1HJQ6wMdAt7J+GL/5Hwmr5UVU3c87sMcxAJ8IsugpM1/7dHon3DF6fmmOObUbBMuMozYVAib6YNEVg7Bt3W8tOsysTYsFHcIrUwNPkK17M3lABIsVHSDeHlpII37q/2OkNCiKXm6TgsdtGjpfhPqzXmvlnPUHL/g8QD2tLsIsCT8dIE+Sy7mq/8GgDDoqihSSFTpdAk52ONp+YMtoQX1Wuhmz9pok4H57/0SyT7yOlewUpmtf7Gix+i1ekf1mO2rFl254oG3xN0nWMnwUUOFyj/J3fjc72Z3XP6GmBd+I8ZwNz+9WHtqW9T2AZ0l1IEOrqp1I6Qt2Zl1X7topTTFjUVPa5zbcYaNmD0N3lxaWLTYw0wssEIVuTYhFVCHCadjA/O2M+DKyNCLHzEIXJlqEFgFQMZ1mOvG0iMi46xnY7ANDgPejSFcLjApaez68QHO+KRs3GQrYIv/2l5nM=
on_success: never
on_failure: always
branches:
only:
- master
- qa