taskana/.travis.yml

91 lines
3.0 KiB
YAML

dist: xenial
language: java
jdk:
- openjdk8
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
- web/node_modules
stages:
- Compile
- Test
- "Release / Deploy"
env:
global:
- DEPLOY_REPO=Taskana/taskana
matrix:
- DB=H2
- DB=DB2_10_5
- DB=DB2_11_1
- DB=POSTGRES_10_4
stage: Test
install: skip
script: ci/test.sh $DB
before_cache: rm -rf $HOME/.m2/repository/pro/taskana
matrix:
include:
- stage: Compile
name: taskana-web
language: node_js
node_js: 12.10.0
install: skip
env: MODULE=WEB
script: ci/compile.sh $MODULE
before_cache: rm -rf $HOME/.m2/repository/pro/taskana
- stage: Compile
name: taskana-lib
install: skip
env: MODULE=LIB
script: ci/compile.sh $MODULE
before_cache: rm -rf $HOME/.m2/repository/pro/taskana
- stage: Compile
name: taskana-rest
install: skip
env: MODULE=REST
script: ci/compile.sh $MODULE
before_cache: rm -rf $HOME/.m2/repository/pro/taskana
- stage: "Release / Deploy"
install: ci/change_version.sh -m .
&& ( cd web && npm install )
&& ( cd web && npm run build:prod )
&& mvn -q install -T 4C -am -DskipTests -DmFaven.javadoc.skip -Dcheckstyle.skip -pl :taskana-rest-spring-test
&& mvn -q prepare-package -pl :taskana-rest-spring-test
&& mvn -q install -DskipTests -Dmaven.javadoc.skip -Dcheckstyle.skip -pl :taskana-rest-spring-example
env: RELEASE_PROFILE=$([[ "$TRAVIS_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] && echo "release" || echo "snapshot")
name: release / deploy / commit
# decoding gpg key and importing it. Gpg key is necessary to sign artifacts for release.
before_script: |
openssl aes-256-cbc -K "$encrypted_21a5d40e43a3_key" -iv "$encrypted_21a5d40e43a3_iv"
-in "ci/codesigning.asc.enc" -out "ci/codesigning.asc" -d && gpg --import "ci/codesigning.asc"
script: |
mvn deploy -P "$RELEASE_PROFILE" --settings ci/mvnsettings.xml
-pl \!taskana-cdi-example,\!taskana-spring-example,\!taskana-rest-spring-test,\!taskana-rest-spring-example,
\!taskana-rest-spring-wildfly-example -DskipTests -Dmaven.javadoc.skip -Dcheckstyle.skip
after_success: ci/change_version.sh -i -m . && ci/commitPoms.sh
before_cache: rm -rf $HOME/.m2/repository/pro/taskana
deploy:
provider: cloudfoundry
username: $BLUEMIX_ACCOUNT
password: $BLUEMIX_ACCOUNT_PASSWORD
api: https://api.ng.bluemix.net
organization: "NovaTec Consulting GmbH"
space: Taskana
on:
all_branches: true
if: repo = env(DEPLOY_REPO) AND (tag =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ OR branch = master) AND type != pull_request