Fix travis-ci build, re-enable Oracle tests

This commit is contained in:
Travis Burtrum 2019-07-14 21:27:52 -04:00
parent 73867bb011
commit 14d4b897ad
4 changed files with 37 additions and 31 deletions

View File

@ -30,19 +30,19 @@ before_script:
script: script:
- docker ps -a - mvn -v
# java8+ supports everything # java8+ supports everything
- ./test/runSnapshotTests.sh || travis_terminate 1; - ./test/runSnapshotTests.sh --offline || travis_terminate 1;
# everything against BIND # everything against BIND
- mvn -B -pl test clean test -DjdbcMapper.databaseType=BIND --settings .travis-settings.xml -P oracle '-DjdbcUrl1=jdbc:postgresql:test_db' '-DjdbcUrl2=jdbc:mariadb://127.0.0.1:3306/test_db?user=root' '-DjdbcUrl3=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' '-DjdbcUrl4=jdbc:sqlserver://localhost:1433;databaseName=master;username=sa;password=<YourStrong!Passw0rd>;' || travis_terminate 1; - mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=BIND -P oracle '-DjdbcUrl1=jdbc:postgresql:test_db' '-DjdbcUrl2=jdbc:mariadb://127.0.0.1:3306/test_db?user=root' '-DjdbcUrl3=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' '-DjdbcUrl4=jdbc:sqlserver://localhost:1433;databaseName=master;username=sa;password=<YourStrong!Passw0rd>;' || travis_terminate 1;
# everything against BIND jdbcMapper, but OPTIMAL queryMapper # everything against BIND jdbcMapper, but OPTIMAL queryMapper
- mvn -B -pl test clean test -DjdbcMapper.databaseType=BIND -DqueryMapper.databaseType=OPTIMAL --settings .travis-settings.xml -P oracle '-DjdbcUrl1=jdbc:postgresql:test_db' '-DjdbcUrl2=jdbc:mariadb://127.0.0.1:3306/test_db?user=root' '-DjdbcUrl3=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' '-DjdbcUrl4=jdbc:sqlserver://localhost:1433;databaseName=master;username=sa;password=<YourStrong!Passw0rd>;' || travis_terminate 1; - mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=BIND -DqueryMapper.databaseType=OPTIMAL -P oracle '-DjdbcUrl1=jdbc:postgresql:test_db' '-DjdbcUrl2=jdbc:mariadb://127.0.0.1:3306/test_db?user=root' '-DjdbcUrl3=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' '-DjdbcUrl4=jdbc:sqlserver://localhost:1433;databaseName=master;username=sa;password=<YourStrong!Passw0rd>;' || travis_terminate 1;
# h2 and postgre against ANY # h2 and postgre against ANY
- mvn -B -pl test clean test -DjdbcMapper.databaseType=ANY '-DjdbcUrl=h2' '-DjdbcUrl1=jdbc:postgresql:test_db' || travis_terminate 1; - mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=ANY '-DjdbcUrl=h2' '-DjdbcUrl1=jdbc:postgresql:test_db' || travis_terminate 1;
# oracle against ORACLE # oracle against ORACLE
#- mvn -B -pl test clean test -DjdbcMapper.databaseType=ORACLE --settings .travis-settings.xml -P oracle '-DjdbcUrl=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' || travis_terminate 1; - mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=ORACLE -P oracle '-DjdbcUrl=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' || travis_terminate 1;
# hsql against UNNEST # hsql against UNNEST
- mvn -B -pl test clean test -DjdbcMapper.databaseType=UNNEST '-DjdbcUrl=hsqldb' || travis_terminate 1; - mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=UNNEST '-DjdbcUrl=hsqldb' || travis_terminate 1;
matrix: matrix:
include: include:
@ -54,23 +54,24 @@ matrix:
- openjdk-7-jre-headless - openjdk-7-jre-headless
script: script:
# java6 doesn't support ms-sql at all, and doesn't support h2 with ANY # java6 doesn't support ms-sql at all, and doesn't support h2 with ANY
- .travis/dl_java6_maven.sh - mvn -v
- ./test/runSnapshotTests.sh --offline || travis_terminate 1; - ./test/runSnapshotTests.sh --offline || travis_terminate 1;
- mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=BIND --settings .travis-settings.xml -P oracle '-DjdbcUrl1=jdbc:postgresql:test_db' '-DjdbcUrl2=jdbc:mariadb://127.0.0.1:3306/test_db?user=root' '-DjdbcUrl3=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' || travis_terminate 1; - mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=BIND -P oracle '-DjdbcUrl1=jdbc:postgresql:test_db' '-DjdbcUrl2=jdbc:mariadb://127.0.0.1:3306/test_db?user=root' '-DjdbcUrl3=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' || travis_terminate 1;
- mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=BIND -DqueryMapper.databaseType=OPTIMAL --settings .travis-settings.xml -P oracle '-DjdbcUrl1=jdbc:postgresql:test_db' '-DjdbcUrl2=jdbc:mariadb://127.0.0.1:3306/test_db?user=root' '-DjdbcUrl3=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' || travis_terminate 1; - mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=BIND -DqueryMapper.databaseType=OPTIMAL -P oracle '-DjdbcUrl1=jdbc:postgresql:test_db' '-DjdbcUrl2=jdbc:mariadb://127.0.0.1:3306/test_db?user=root' '-DjdbcUrl3=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' || travis_terminate 1;
- mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=ANY '-DjdbcUrl=jdbc:postgresql:test_db' || travis_terminate 1; - mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=ANY '-DjdbcUrl=jdbc:postgresql:test_db' || travis_terminate 1;
#- mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=ORACLE --settings .travis-settings.xml -P oracle '-DjdbcUrl=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' || travis_terminate 1; - mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=ORACLE -P oracle '-DjdbcUrl=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' || travis_terminate 1;
- mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=UNNEST '-DjdbcUrl=hsqldb' || travis_terminate 1; - mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=UNNEST '-DjdbcUrl=hsqldb' || travis_terminate 1;
- env: JDK='OpenJDK 7' - env: JDK='OpenJDK 7'
jdk: openjdk7 jdk: openjdk7
script: script:
# java7 doesn't support h2 with ANY # java7 doesn't support h2 with ANY
- ./test/runSnapshotTests.sh || travis_terminate 1; - mvn -v
- mvn -B -pl test clean test -DjdbcMapper.databaseType=BIND --settings .travis-settings.xml -P oracle '-DjdbcUrl1=jdbc:postgresql:test_db' '-DjdbcUrl2=jdbc:mariadb://127.0.0.1:3306/test_db?user=root' '-DjdbcUrl3=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' '-DjdbcUrl4=jdbc:sqlserver://localhost:1433;databaseName=master;username=sa;password=<YourStrong!Passw0rd>;' || travis_terminate 1; - ./test/runSnapshotTests.sh --offline || travis_terminate 1;
- mvn -B -pl test clean test -DjdbcMapper.databaseType=BIND -DqueryMapper.databaseType=OPTIMAL --settings .travis-settings.xml -P oracle '-DjdbcUrl1=jdbc:postgresql:test_db' '-DjdbcUrl2=jdbc:mariadb://127.0.0.1:3306/test_db?user=root' '-DjdbcUrl3=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' '-DjdbcUrl4=jdbc:sqlserver://localhost:1433;databaseName=master;username=sa;password=<YourStrong!Passw0rd>;' || travis_terminate 1; - mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=BIND -P oracle '-DjdbcUrl1=jdbc:postgresql:test_db' '-DjdbcUrl2=jdbc:mariadb://127.0.0.1:3306/test_db?user=root' '-DjdbcUrl3=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' '-DjdbcUrl4=jdbc:sqlserver://localhost:1433;databaseName=master;username=sa;password=<YourStrong!Passw0rd>;' || travis_terminate 1;
- mvn -B -pl test clean test -DjdbcMapper.databaseType=ANY '-DjdbcUrl=jdbc:postgresql:test_db' || travis_terminate 1; - mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=BIND -DqueryMapper.databaseType=OPTIMAL -P oracle '-DjdbcUrl1=jdbc:postgresql:test_db' '-DjdbcUrl2=jdbc:mariadb://127.0.0.1:3306/test_db?user=root' '-DjdbcUrl3=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' '-DjdbcUrl4=jdbc:sqlserver://localhost:1433;databaseName=master;username=sa;password=<YourStrong!Passw0rd>;' || travis_terminate 1;
#- mvn -B -pl test clean test -DjdbcMapper.databaseType=ORACLE --settings .travis-settings.xml -P oracle '-DjdbcUrl=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' || travis_terminate 1; - mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=ANY '-DjdbcUrl=jdbc:postgresql:test_db' || travis_terminate 1;
- mvn -B -pl test clean test -DjdbcMapper.databaseType=UNNEST '-DjdbcUrl=hsqldb' || travis_terminate 1; - mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=ORACLE -P oracle '-DjdbcUrl=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' || travis_terminate 1;
- mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=UNNEST '-DjdbcUrl=hsqldb' || travis_terminate 1;
- env: JDK='OpenJDK 8' - env: JDK='OpenJDK 8'
jdk: openjdk8 jdk: openjdk8
- env: JDK='OracleJDK 8' - env: JDK='OracleJDK 8'
@ -91,6 +92,7 @@ matrix:
install: . ./install-jdk.sh -F 14 -L GPL install: . ./install-jdk.sh -F 14 -L GPL
before_install: before_install:
- mv .travis/settings.xml $HOME/.m2/settings.xml
- wget https://raw.githubusercontent.com/sormuras/bach/master/install-jdk.sh - wget https://raw.githubusercontent.com/sormuras/bach/master/install-jdk.sh
- mkdir -p $HOME/.traviscache - mkdir -p $HOME/.traviscache
- if [[ "${JDK}" == 'OpenJDK 6' ]]; then - if [[ "${JDK}" == 'OpenJDK 6' ]]; then
@ -98,6 +100,11 @@ before_install:
sudo tar xJvf $HOME/.traviscache/jdk6-6u45-6-x86_64.pkg.tar.xz -C /; sudo tar xJvf $HOME/.traviscache/jdk6-6u45-6-x86_64.pkg.tar.xz -C /;
export JAVA_HOME=/usr/lib/jvm/java-6-jdk; export JAVA_HOME=/usr/lib/jvm/java-6-jdk;
fi fi
- if [ ! -f $HOME/.m2/repository/org/sonatype/oss/oss-parent/9/oss-parent-9.pom ]; then
set -euxo pipefail;
wget -q -O- https://github.com/moparisthebest/travis-ci-cache/raw/master/repository.tar.gz | tar xzf - -C $HOME/.m2/;
set +euxo pipefail;
fi
- .travis/oracle/download.sh - .travis/oracle/download.sh
- .travis/oracle/install.sh - .travis/oracle/install.sh
@ -110,16 +117,22 @@ install:
[ -d $M2_HOME ] || unzip -qq apache-maven-${CUSTOM_MVN_VERION}-bin.zip; [ -d $M2_HOME ] || unzip -qq apache-maven-${CUSTOM_MVN_VERION}-bin.zip;
[ -d $M2_HOME ] || mv apache-maven-${CUSTOM_MVN_VERION} $M2_HOME; [ -d $M2_HOME ] || mv apache-maven-${CUSTOM_MVN_VERION} $M2_HOME;
export PATH=$M2_HOME/bin:$PATH; export PATH=$M2_HOME/bin:$PATH;
mvn -version; mvn -v;
fi fi
after_success: after_success:
- if [ "${JDK}" == 'OpenJDK 8' ] || [ "${JDK}" == 'OpenJDK 6' ]; then - if [ "${JDK}" == 'OpenJDK 8' ] || [ "${JDK}" == 'OpenJDK 6' ]; then
mvn deploy --settings .travis-settings.xml -DskipTests=true -B || travis_terminate 1; mvn -v;
if [ "${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}" == 'master' ];then
mvn deploy -DskipTests=true -B || travis_terminate 1;
fi
fi fi
before_cache:
- rm -rf $HOME/.m2/repository/com/moparisthebest/jdbcmapper - rm -rf $HOME/.m2/repository/com/moparisthebest/jdbcmapper
cache: cache:
timeout: 3000
directories: directories:
- $HOME/.m2 - $HOME/.m2/repository
- $HOME/.traviscache - $HOME/.traviscache

View File

@ -1,9 +0,0 @@
#!/bin/bash
# maven central only supports TLS 1.2+ now, and java 6 does not, ouch, use java 7 to download them...
set -e
JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 mvn -B -Dhttps.protocols=TLSv1.2 --settings .travis-settings.xml -P oracle clean install
JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 mvn --offline -B clean
git checkout -- .
git clean -dxf
rm -rf ~/.m2/repository/com/moparisthebest/jdbcmapper

View File

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
set -e set -exo pipefail
updateSnapshots=false updateSnapshots=false
if [ "$1" == "--update" ] if [ "$1" == "--update" ]
@ -8,6 +8,8 @@ then
shift shift
fi fi
set -euxo pipefail
mvn="mvn -B -pl test clean test -Dtest=SnapshotTest -DupdateSnapshots=$updateSnapshots" mvn="mvn -B -pl test clean test -Dtest=SnapshotTest -DupdateSnapshots=$updateSnapshots"
mvn "$@" -B -pl '!test' clean install mvn "$@" -B -pl '!test' clean install
@ -15,4 +17,4 @@ $mvn "$@" -DJdbcMapper.beanSuffix=Bean
$mvn "$@" -DjdbcMapper.databaseType=BIND -DJdbcMapper.beanSuffix=BindBean $mvn "$@" -DjdbcMapper.databaseType=BIND -DJdbcMapper.beanSuffix=BindBean
$mvn "$@" -DjdbcMapper.databaseType=ANY -DJdbcMapper.beanSuffix=AnyBean $mvn "$@" -DjdbcMapper.databaseType=ANY -DJdbcMapper.beanSuffix=AnyBean
$mvn "$@" -DjdbcMapper.databaseType=UNNEST -DJdbcMapper.beanSuffix=UnNestBean $mvn "$@" -DjdbcMapper.databaseType=UNNEST -DJdbcMapper.beanSuffix=UnNestBean
#$mvn "$@" -DjdbcMapper.databaseType=ORACLE -P oracle -DJdbcMapper.beanSuffix=OracleBean $mvn "$@" -DjdbcMapper.databaseType=ORACLE -P oracle -DJdbcMapper.beanSuffix=OracleBean