forked from thehyve/transmart-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
91 lines (80 loc) · 4.04 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
dist: trusty
sudo: required
language: groovy
jdk:
- oraclejdk8
php:
- 5.6
env:
global:
- TERM=dumb
matrix:
- DIR=transmart-core-db-tests; PREPARE=assemble; TEST=check
- DIR=transmart-rest-api; TEST=check
- DIR=transmart-core-db; INSTALL=":transmart-data:createVars :transmart-data:setupPostgresTest"; TEST=check
- DIR=transmart-batch; INSTALL=":transmart-data:createVars :transmart-data:setupPostgres travisPreparePostgres"; PREPARE=shadowJar; TEST="test functionalTest"
- DIR=transmart-solr-indexing; INSTALL=":transmart-data:createVars :transmart-data:setupPostgresTest :transmart-batch:travisProperties :transmart-batch:loadPublicTestStudy"; TEST="check"; START_SOLR=true
- DIR=transmart-copy; INSTALL=":transmart-data:createVars :transmart-data:setupPostgresTest"; PREPARE=shadowJar; TEST=check
- DIR=.; TEST="publishToMavenLocal"
addons:
postgresql: 9.6
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/.m2
- $HOME/pg
before_install:
- gradle wrapper
- GRADLE_SCRIPT="$(pwd)/gradlew"
- ${GRADLE_SCRIPT} --version
- groovy --version
- sudo chmod a+rX $HOME
# We don't currently use these sources, but they can be re-enabled if necessary
# - sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 3375DA21
# - echo deb http://apt.thehyve.net/internal/ trusty main | sudo tee /etc/apt/sources.list.d/hyve_internal.list
# - sudo apt-key adv --keyserver keyserver.ubuntu.com --recv E5267A6C
# - echo deb http://ppa.launchpad.net/ondrej/php/ubuntu trusty main | sudo tee /etc/apt/sources.list.d/ondrej_php.list
- sudo apt-get -qq update
- sudo apt-get install -y tk-dev html2text gnupg2
- gpg2 --version
- php --version
- ([ -z "$PREINSTALL" ] && echo "Skipping preinstall.") || (echo $PREINSTALL; $PREINSTALL)
- PWD=`pwd`
- echo $PWD
install:
- pushd "$DIR"
- ([ -z "$INSTALL" ] && echo "Skipping install.") || (echo $INSTALL; ${GRADLE_SCRIPT} $INSTALL)
- popd
before_script:
- pushd "$DIR"
- ([ -z "$PREPARE" ] && echo "Skipping prepare.") || (echo $PREPARE; ${GRADLE_SCRIPT} $PREPARE)
- popd
- pushd transmart-data
- >
(( ! [ "$START_SOLR" == "true" ]) && echo "Skipping Solr.") || (${GRADLE_SCRIPT} setupSolr; echo "Starting Solr ...";
source vars; (make -C solr start > solr.log 2> solr.err &); sleep 10; echo "Solr started.")
- popd
script:
- pushd "$DIR"
- ([ -z "$TEST" ] && echo "Skipping test.") || (echo $TEST; ${GRADLE_SCRIPT} $TEST)
- popd
after_success:
- echo "Writing summary..."
- ([ -d "$DIR/build/reports/tests" ]) && html2text $DIR/build/reports/tests/index.html
after_failure:
- echo "Writing reports..."
- html2text "$DIR/build/reports/tests/index.html"
- for f in "$DIR"/build/reports/tests/classes/*.html; do echo "$f"; html2text "$f"; done
- ([ -d "$DIR/build/reports/tests/functional" ]) && (html2text "$DIR/build/reports/tests/functional/index.html")
- ([ -d "$DIR/build/reports/tests/functional" ]) && (for f in "$DIR"/build/reports/tests/functional/classes/*.html; do echo "$f"; html2text "$f"; done)
- ([ "$START_SOLR" == "true" ]) && (echo "solr.log"; cat transmart-data/solr.log; echo "solr.err"; cat transmart-data/solr.err)
notifications:
hipchat:
rooms:
secure: "rNPPKSL1o8R71YcD7T+jDFTFfSFoXO/YKCubqwP5TXFL+OtqEwZOrkpKSpyN+Ap6Uxk85TBgat8Bur/WkTWXcq6HruyhfKkKea96ZVVSWjZWhKHqqTLvMeABb1uh6JxpXAc/5Cm3K5/yTHBFFiFSyOemuEl88bqeqJjDSzIxvOLrdLhnYWVlo3SJcUwAab0IKab8MpbZUEa6eFB5+MmCQfwjDZBr9Qn7UGfQWQdEp801sHGzU2i58uwF7+RVYhUyZtT9428FmPhxAS2EgW663JpzNQYpVCws02UW8aCgu2SCWWtUKwk3dy/6hSc5UoxWIIKaIpPbre+SA5JYeB7RwIad7N6/eDHdb/ByN1lOP6/pAEzPSnajxJrU/AnohhIwgcPaZ3aHbrqq8RrGPy1sNwFTKvFzBkVu5aWKR7JMgKuBq0LXv4iq1qBJw1s+xK4CHNoOAESZG2a0wo/cmzK+C2OzKdTnjN25RoHwXBOS7AzJtdtqpU8PaESZ0X1BxT19nD3RALiCfS/054SU3mfswhVAdo6rVhHDgGNxqRflgZIVmDsYjBRZ4TR4jDnUhc+s9ILo1eI/imq7tQZ6rFeQrydCu4p2U4LrFAWu7E0QwTbsfnSs5KN7Fah1xhS+6xttOuqbAmPQXEeLKSkk6B9Q7G/R0VHAKdaNkLweA0ZzATM="
on_success: never
on_failure: always