TSK-1282: configured travis for jdk11 + jdk8 for wildfly

This commit is contained in:
Mustapha Zorgati 2020-10-29 21:07:59 +01:00
parent 3f44b32ac0
commit 7721fbb428
2 changed files with 22 additions and 15 deletions

View File

@ -1,10 +1,10 @@
os: linux
dist: xenial
dist: bionic
language: java
jdk:
- openjdk8
- openjdk11
addons:
sonarcloud:
@ -16,8 +16,6 @@ git:
services:
- docker
- xvfb # required because our frontend tests currently use firefox as a browser (and thus do not run headless)
# see https://docs.travis-ci.com/user/gui-and-headless-browsers/#using-xvfb-to-run-tests-that-require-a-gui for more information
cache:
directories:
- $HOME/.m2
@ -39,23 +37,14 @@ env:
jobs:
- DB=H2
- DB=DB2_11_1
- DB=POSTGRES_10
install: skip
# include SONAR_PROJECT_KEY as a second parameter if this is not a pull request
script: ci/test.sh "$DB" "$([ "false" = "$TRAVIS_PULL_REQUEST" ] && echo "$SONAR_PROJECT_KEY")"
before_cache: rm -rf "$HOME/.m2/repository/pro/taskana"
jobs:
include:
- stage: Test
before_script: nvm install $NODE_VERSION
install: skip
env: DB=WEB
script: ci/test.sh "$DB"
before_cache: rm -rf "$HOME/.m2/repository/pro/taskana"
# We are using the environment variable 'MODULE' to force travis into using a different cache for each build.
# See https://docs.travis-ci.com/user/caching/#caches-and-build-matrices for detailed information on
# which characteristics determine the cache selection.
@ -89,6 +78,19 @@ jobs:
script: ci/compile.sh "$MODULE"
before_cache: rm -rf "$HOME/.m2/repository/pro/taskana"
- stage: Test
install: skip
env: DB=POSTGRES_10
script: ci/test.sh "$DB" && export JAVA_HOME=/usr/local/lib/jvm/openjdk8 && ci/test.sh WILDFLY
before_cache: rm -rf "$HOME/.m2/repository/pro/taskana"
- stage: Test
before_script: nvm install $NODE_VERSION
install: skip
env: DB=WEB
script: ci/test.sh "$DB"
before_cache: rm -rf "$HOME/.m2/repository/pro/taskana"
- stage: Release / Deploy
name: release / deploy / commit
before_install: |

View File

@ -16,6 +16,7 @@ set -e # fail fast
#H - POSTGRES_10
#H module:
#H - HISTORY
#H - WILDFLY
#H sonar project key:
#H the key of the sonarqube project where the coverage will be sent to.
#H If empty nothing will be sent
@ -52,12 +53,16 @@ function main() {
set -x
eval "$REL/prepare_db.sh '$1'"
### INSTALL ###
mvn -q install -B -f $REL/.. -P postgres -am -T 4C -pl :taskana-rest-spring-example-wildfly -Dasciidoctor.skip -DskipTests -Dmaven.javadoc.skip -Dcheckstyle.skip
mvn -q install -B -f $REL/.. -P postgres -am -T 4C -pl :taskana-rest-spring-example-common -Dasciidoctor.skip -DskipTests -Dmaven.javadoc.skip -Dcheckstyle.skip
### TEST ###
mvn -q verify -B -f $REL/.. -Dmaven.javadoc.skip -Dcheckstyle.skip -pl :taskana-core
;;
WILDFLY)
set -x
eval "$REL/prepare_db.sh 'POSTGRES_10'"
# Same as above (H2) we can not use the fancy '-f' maven option
(cd $REL/.. && mvn -q verify -B -pl :taskana-rest-spring-example-wildfly -Ddb.type=postgres -Dmaven.javadoc.skip -Dcheckstyle.skip)
(cd $REL/../rest/taskana-rest-spring-example-wildfly && mvn -q verify -B -Ddb.type=postgres)
;;
HISTORY)
set -x