forked from p6spy/p6spy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
109 lines (92 loc) · 3.91 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
sudo: required
dist: trusty
services:
- docker
- mysql
- postgresql
git:
depth: false
addons:
sonarcloud:
organization: "p6spy-github"
token:
secure: "e58ZcHgvejYlEGki2uxy1b4LuQiFKnULEpUUUWALfM0NV/JZAyxLMjrUYeSiJkinMs/yA7bxjGzXIpEu6eRgCCZhzolBvs6QbRzrkhAhaZXVnEbYojFkPGUc6QFsU6V30mI0I2k7O9FoUiwoyZwWVV3HT2phn4s+ebLFgN+Krvg="
language: java
jdk:
# seems to be unsupported by trusty: https://github.com/travis-ci/travis-ci/issues/7884#issuecomment-308451879
# - oraclejdk7
# unresolved problem on trusty: https://travis-ci.org/p6spy/p6spy/jobs/251801157
# failing with: Exception in thread "main" javax.net.ssl.SSLException: java.security.ProviderException: java.security.InvalidKeyException: EC parameters error
# ...
# Caused by: java.security.NoSuchProviderException: no such provider: SunEC
# ...
# - openjdk7
- oraclejdk8
- openjdk8
- openjdk11
- openjdk14
env:
global:
- LD_LIBRARY_PATH=/home/db2inst1/sqllib/lib64/
- DOCKER_COMPOSE_VERSION=1.13.0
- ORG_GRADLE_PROJECT_env=travis
# https://docs.travis-ci.com/user/languages/java/#Caching
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -rf $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.sonar/cache
before_install:
# latest docker
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- docker --version
# docker compose (due to need for healthcheck)
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- docker-compose --version
install:
- docker-compose -f docker-compose.travis.yml up & # using rather than 'docker-compose up -d' to see log msgs in console
before_script:
# travis provided DBs
- ./script/travis/before_script_mysql.sh
- ./script/travis/before_script_postgres.sh
# docker-compose driven DBs
- wget -O /tmp/wtfc.sh https://raw.githubusercontent.com/typekpb/wtfc/v0.0.2/wtfc.sh && chmod +x /tmp/wtfc.sh
- /tmp/wtfc.sh -T 0 -P 'docker inspect -f "{{.State.Health.Status}}" p6spy_firebird_1 | grep -qw healthy'
- /tmp/wtfc.sh -T 0 -P 'docker inspect -f "{{.State.Health.Status}}" p6spy_oracle_1 | grep -qw healthy'
- mkdir -p ./build/repo && docker cp p6spy_oracle_1:/u01/app/oracle/product/11.2.0/xe/jdbc/lib/ojdbc6.jar ./build/repo
script:
- ./gradlew check --info --stacktrace
after_success:
- |
# oraclejdk 8 used for all the publishing works
if [[ $TRAVIS_JDK_VERSION == "oraclejdk8" ]]; then
# github release notes sync (via chandler)
# TODO we should update release notes during release (=> !master)
if [[ $TRAVIS_BRANCH == "master" && $TRAVIS_PULL_REQUEST == "false" ]]; then
gem install --no-ri --no-rdoc chandler
chandler --changelog=$(pwd)/docs/releasenotes.md --github=p6spy/p6spy --tag-prefix=p6spy- push
fi
# jars publishing
if [[ ! -z "$TRAVIS_TAG" ]]; then
# releases to bintray
# publishing done via com.jfrog.bintray plugin, rather than travis bintray integration => independant on CI env
# relevant env vars: BINTRAY_USER and BINTRAY_API_KEY
./gradlew artifactoryPublish bintrayUpload --info --stacktrace
elif [[ $TRAVIS_BRANCH == "master" && $TRAVIS_PULL_REQUEST == "false" && $(grep version=[-._0-9a-zA-Z]*-SNAPSHOT$ gradle.properties | wc -l) -eq 1 ]]; then
# snapshots to oss.jfrog.org
# relevant env vars: BINTRAY_USER and BINTRAY_API_KEY
./gradlew artifactoryPublish --info --stacktrace
fi
elif [[ $TRAVIS_JDK_VERSION == "openjdk11" ]]; then
./gradlew sonarqube --info --stacktrace
fi
notifications:
email: