forked from Taskana/taskana
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
85 lines (79 loc) · 2.88 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
language: java
jdk:
- oraclejdk8
services:
- docker
cache:
directories:
- $HOME/.m2
- web/node_modules
- web/dist
stages:
- Build
- Test
- "Release / Deploy"
env:
global:
- FORCE_DEPLOY=false
- NODE_VERSION=8
- DEPLOY_REPO=Taskana/taskana
- VERSION=v`mvn -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.6.0:exec -f ./lib`
matrix:
- DB=H2 PROJECT=REST
- DB=H2 PROJECT=LIB
- DB=DB2_10_5 PROJECT=CORE
- DB=DB2_11_1 PROJECT=CORE
- DB=POSTGRES_10_4 PROJECT=CORE
- DB=POSTGRES_10_4 PROJECT=WILDFLY
stage: Test
script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
- nvm install $NODE_VERSION
&& ci/change_version.sh -m "lib/ rest/" -swarm lib/taskana-cdi/src/test/java/pro/taskana/TaskanaProducersTest.java
&& ci/test.sh $DB $PROJECT
jobs:
include:
- stage: Build
install:
- nvm install $NODE_VERSION
&& (cd web && npm install && npm rebuild node-sass)
&& ci/change_version.sh -m "lib/ rest/" -swarm lib/taskana-cdi/src/test/java/pro/taskana/TaskanaProducersTest.java
script:
- (cd web && npm run build:prod)
&& mvn clean install -q -f lib -DskipTests -Dmaven.javadoc.skip
&& mvn clean install -q -f rest -DskipTests -Dmaven.javadoc.skip -P history.plugin
- stage: "Release / Deploy"
name: "Release stage"
script:
- ci/release.sh lib/taskana-core $TRAVIS_TAG
&& ci/release.sh lib/taskana-spring $TRAVIS_TAG
&& ci/release.sh lib/taskana-cdi $TRAVIS_TAG
&& ci/release.sh web/ $TRAVIS_TAG
&& ci/release.sh rest/taskana-rest-spring $TRAVIS_TAG
&& ci/release.sh rest/taskana-rest-spring-base $TRAVIS_TAG
if: repo = env(DEPLOY_REPO) AND (tag =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ OR branch = master) AND type != pull_request
- stage: "Release / Deploy"
name: "Update Pom's stage"
script:
- ci/change_version.sh -i -m "lib/ rest/" -swarm lib/taskana-cdi/src/test/java/pro/taskana/TaskanaProducersTest.java
&& ci/commitPoms.sh lib/taskana-cdi/src/test/java/pro/taskana/TaskanaProducersTest.java
if: repo = env(DEPLOY_REPO) AND tag =~ ^v[0-9]+\.[0-9]+\.[0-9]+$
- stage: "Release / Deploy"
name: "Deploy stage"
script:
- if [[ $FORCE_DEPLOY = true ]];
then ci/copy-rest-spring.sh $VERSION;
else ci/copy-rest-spring.sh $TRAVIS_TAG;
fi
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 (env(FORCE_DEPLOY) = true)