-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
46 lines (43 loc) · 2.36 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
language: java
jdk:
- openjdk8
- oraclejdk11
# The following fail to be fetched by Travis, skipping for now. Potentially related:
# https://docs.travis-ci.com/user/languages/java/#using-java-10-and-later
#- oraclejdk7
#- openjdk7
#- oraclejdk8
#- oraclejdk9
#- openjdk9
#- openjdk10
#- openjdk11
#- oraclejdk12
#- openjdk12
env:
global:
- ORACLE_DOWNLOAD=http://download.oracle.com/otn-pub/java/jdk
- OLD_JDK_MIRROR=http://ftp.osuosl.org/pub/funtoo/distfiles/oracle-java
matrix:
- REGION=.learnosity.com
- REGION=-ca.learnosity.com
#- REGION=-ca.learnosity.com CUSTOM_JDK_MINOR=8 CUSTOM_JDK_REV=172 CUSTOM_JDK_BUILD=11 CUSTOM_JDK_HASH=a58eab1ec242421181065cdc37240b08
script:
- java -version
- mvn verify
before_install:
# Login to docker hub
- echo "$DOCKERHUB_PASSWORD" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
# Workaround oraclejdk7's absence by setting it as a custom JDK
- if [ "${TRAVIS_JDK_VERSION}" == "oraclejdk7" ]; then export CUSTOM_JDK_MINOR=7 CUSTOM_JDK_REV=80; fi
# Convenience variables
- if [ -n "${CUSTOM_JDK_MINOR}" ] && [ -n "${CUSTOM_JDK_REV}" ]; then export CUSTOM_JDK_VERSION="${CUSTOM_JDK_MINOR}u${CUSTOM_JDK_REV}"; fi
# Download custom JDKs
- test "${TRAVIS_JDK_VERSION}" != "oraclejdk7" -o "${CUSTOM_JDK_MINOR}" != "7" || curl -L "${OLD_JDK_MIRROR}/jdk-${CUSTOM_JDK_VERSION}-linux-x64.tar.gz" -o "/tmp/jdk-${CUSTOM_JDK_VERSION}-linux-x64.tar.gz"
- test "${TRAVIS_JDK_VERSION}" != "oraclejdk8" -o "${CUSTOM_JDK_MINOR}" != "8" || curl -L -b "oraclelicense=accept-securebackup-cookie" "${ORACLE_DOWNLOAD}/${CUSTOM_JDK_VERSION}-b${CUSTOM_JDK_BUILD}/${CUSTOM_JDK_HASH}/jdk-${CUSTOM_JDK_VERSION}-linux-x64.tar.gz" -o "/tmp/jdk-${CUSTOM_JDK_VERSION}-linux-x64.tar.gz"
# Install custom JDKs and set PATHs
- if [ -e "/tmp/jdk-${CUSTOM_JDK_VERSION}-linux-x64.tar.gz" ]; then export JAVA_HOME="/usr/lib/jvm/custom-java-${CUSTOM_JDK_MINOR}-oracle"; export PATH="${JAVA_HOME}/bin:${PATH}"; sudo rm -rf "${JAVA_HOME}"; tar xzf "/tmp/jdk-${CUSTOM_JDK_VERSION}-linux-x64.tar.gz" -C /tmp; sudo mv "/tmp/jdk1.${CUSTOM_JDK_MINOR}.0_${CUSTOM_JDK_REV}" "${JAVA_HOME}"; fi
notifications:
slack:
rooms:
secure: cEVjK0UWhOCd7nodIWy3tJwcOmN2b4rAwW3OKrww5YAoB8EzRWmZJ4iUW06Trl9Z1MWzPtjVx7fda1KViOzqkH1hcCES4FOejcaGr0qzzgyl+Xo+M5RusVDNoDkdVysJ7bJMvskJqaQyMpZLHnyqrJXrRjZ8isKtnVacLHikwDM=
on_success: change