TSK-925: integrated taskana-history in the build
This commit is contained in:
parent
1518cfc298
commit
16aa628602
20
.travis.yml
20
.travis.yml
|
|
@ -30,6 +30,7 @@ env:
|
||||||
- DB=DB2_10_5
|
- DB=DB2_10_5
|
||||||
- DB=DB2_11_1
|
- DB=DB2_11_1
|
||||||
- DB=POSTGRES_10_4
|
- DB=POSTGRES_10_4
|
||||||
|
- DB=HISTORY
|
||||||
|
|
||||||
stage: Test
|
stage: Test
|
||||||
install: skip
|
install: skip
|
||||||
|
|
@ -38,6 +39,9 @@ before_cache: rm -rf $HOME/.m2/repository/pro/taskana
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
# 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.
|
||||||
- stage: Compile
|
- stage: Compile
|
||||||
name: taskana-web
|
name: taskana-web
|
||||||
language: node_js
|
language: node_js
|
||||||
|
|
@ -61,12 +65,19 @@ matrix:
|
||||||
script: ci/compile.sh $MODULE
|
script: ci/compile.sh $MODULE
|
||||||
before_cache: rm -rf $HOME/.m2/repository/pro/taskana
|
before_cache: rm -rf $HOME/.m2/repository/pro/taskana
|
||||||
|
|
||||||
|
- stage: Compile
|
||||||
|
name: taskana-simplehistory
|
||||||
|
install: skip
|
||||||
|
env: MODULE=HISTORY
|
||||||
|
script: ci/compile.sh $MODULE
|
||||||
|
before_cache: rm -rf $HOME/.m2/repository/pro/taskana
|
||||||
|
|
||||||
- stage: "Release / Deploy"
|
- stage: "Release / Deploy"
|
||||||
name: release / deploy / commit
|
name: release / deploy / commit
|
||||||
before_install: |
|
before_install: |
|
||||||
openssl aes-256-cbc -K "$encrypted_21a5d40e43a3_key" -iv "$encrypted_21a5d40e43a3_iv" \
|
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"
|
-in "ci/codesigning.asc.enc" -out "ci/codesigning.asc" -d && gpg --import "ci/codesigning.asc"
|
||||||
install: ci/change_version.sh -m .
|
install: ci/change_version.sh -m ". history"
|
||||||
&& ( cd web && npm install )
|
&& ( cd web && npm install )
|
||||||
&& ( cd web && npm run build:prod )
|
&& ( 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 install -T 4C -am -DskipTests -DmFaven.javadoc.skip -Dcheckstyle.skip -pl :taskana-rest-spring-test
|
||||||
|
|
@ -75,9 +86,12 @@ matrix:
|
||||||
script: |
|
script: |
|
||||||
mvn deploy -T 4C -P `[[ "$TRAVIS_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] && echo "release" || echo "snapshot"` \
|
mvn deploy -T 4C -P `[[ "$TRAVIS_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] && echo "release" || echo "snapshot"` \
|
||||||
--settings ci/mvnsettings.xml -DskipTests -Dcheckstyle.skip -pl !:taskana-spring-example,!:taskana-cdi-example,\
|
--settings ci/mvnsettings.xml -DskipTests -Dcheckstyle.skip -pl !:taskana-spring-example,!:taskana-cdi-example,\
|
||||||
!:taskana-rest-spring-example,!:taskana-rest-spring-wildfly-example
|
!:taskana-rest-spring-example,!:taskana-rest-spring-wildfly-example \
|
||||||
|
&& mvn deploy -f history --settings ci/mvnsettings.xml -DskipTests -Dcheckstyle.skip \
|
||||||
|
-P `[[ "$TRAVIS_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] && echo "release" || echo "snapshot"` \
|
||||||
|
-pl !:taskana-simplehistory-spring-test,!:taskana-simplehistory-rest-spring-example
|
||||||
before_cache: rm -rf $HOME/.m2/repository/pro/taskana
|
before_cache: rm -rf $HOME/.m2/repository/pro/taskana
|
||||||
after_success: ci/change_version.sh -i -m . && ci/commitPoms.sh
|
after_success: ci/change_version.sh -i -m ". history" && ci/commitPoms.sh
|
||||||
deploy:
|
deploy:
|
||||||
provider: cloudfoundry
|
provider: cloudfoundry
|
||||||
username: $BLUEMIX_ACCOUNT
|
username: $BLUEMIX_ACCOUNT
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e # fail fast
|
set -e # fail fast
|
||||||
|
|
||||||
#H Usage:
|
#H Usage:
|
||||||
#H compile.sh -h | test.sh --help
|
#H compile.sh -h | compile.sh --help
|
||||||
#H
|
#H
|
||||||
#H prints this help and exits
|
#H prints this help and exits
|
||||||
#H
|
#H
|
||||||
|
|
@ -26,18 +25,24 @@ function main() {
|
||||||
REL=$(dirname "$0")
|
REL=$(dirname "$0")
|
||||||
case "$1" in
|
case "$1" in
|
||||||
WEB)
|
WEB)
|
||||||
|
set -x
|
||||||
(cd $REL/../web && npm install --silent)
|
(cd $REL/../web && npm install --silent)
|
||||||
(cd $REL/../web && npm run build)
|
(cd $REL/../web && npm run build)
|
||||||
;;
|
;;
|
||||||
LIB)
|
LIB)
|
||||||
mvn -q install -N -Dcheckstyle.skip -f $REL/..
|
set -x
|
||||||
mvn -q compile -f $REL/../lib
|
mvn -q install -B -f $REL/.. -DskipTests -Dcheckstyle.skip -Dmaven.javadoc.skip -N
|
||||||
|
mvn -q compile -B -f $REL/../lib
|
||||||
;;
|
;;
|
||||||
REST)
|
REST)
|
||||||
mvn -q install -N -Dcheckstyle.skip
|
set -x
|
||||||
mvn -q install -f lib -N -Dcheckstyle.skip
|
mvn -q install -B -f $REL/.. -pl :taskana-spring -am -DskipTests -Dcheckstyle.skip -Dmaven.javadoc.skip
|
||||||
mvn -q install -f lib/taskana-core -DskipTests -Dmaven.javadoc.skip
|
mvn -q compile -B -f $REL/../rest
|
||||||
mvn -q install -f lib/taskana-spring -DskipTests -Dmaven.javadoc.skip
|
;;
|
||||||
|
HISTORY)
|
||||||
|
set -x
|
||||||
|
mvn -q install -B -f $REL/.. -pl :taskana-rest-spring -am -DskipTests -Dcheckstyle.skip -Dmaven.javadoc.skip
|
||||||
|
mvn -q compile -B -f $REL/../history
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
|
||||||
29
ci/test.sh
29
ci/test.sh
|
|
@ -6,7 +6,7 @@ set -e # fail fast
|
||||||
#H
|
#H
|
||||||
#H prints this help and exits
|
#H prints this help and exits
|
||||||
#H
|
#H
|
||||||
#H test.sh <database>
|
#H test.sh <database|module>
|
||||||
#H
|
#H
|
||||||
#H tests the taskana application. See documentation for further testing details.
|
#H tests the taskana application. See documentation for further testing details.
|
||||||
#H
|
#H
|
||||||
|
|
@ -15,6 +15,8 @@ set -e # fail fast
|
||||||
#H - DB2_10_5
|
#H - DB2_10_5
|
||||||
#H - DB2_11_1
|
#H - DB2_11_1
|
||||||
#H - POSTGRES_10_4
|
#H - POSTGRES_10_4
|
||||||
|
#H module:
|
||||||
|
#H - HISTORY
|
||||||
# Arguments:
|
# Arguments:
|
||||||
# $1: exit code
|
# $1: exit code
|
||||||
function helpAndExit() {
|
function helpAndExit() {
|
||||||
|
|
@ -25,22 +27,37 @@ function helpAndExit() {
|
||||||
function main() {
|
function main() {
|
||||||
[[ $# -eq 0 || "$1" == '-h' || "$1" == '--help' ]] && helpAndExit 0
|
[[ $# -eq 0 || "$1" == '-h' || "$1" == '--help' ]] && helpAndExit 0
|
||||||
REL=$(dirname "$0")
|
REL=$(dirname "$0")
|
||||||
eval "$REL/prepare_db.sh '$1'"
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
H2)
|
H2)
|
||||||
|
set -x
|
||||||
|
eval "$REL/prepare_db.sh '$1'"
|
||||||
|
# We can not use the fance '-f' maven option due to a bug in arquillian. See https://issues.jboss.org/browse/THORN-2049
|
||||||
(cd $REL/.. && mvn -q install -B -T 4C -am -Dmaven.javadoc.skip -Dcheckstyle.skip)
|
(cd $REL/.. && mvn -q install -B -T 4C -am -Dmaven.javadoc.skip -Dcheckstyle.skip)
|
||||||
(cd $REL/../web && npm install --silent && npm run test)
|
(cd $REL/../web && npm install --silent && npm run test)
|
||||||
;;
|
;;
|
||||||
DB2_10_5 | DB2_11_1)
|
DB2_10_5 | DB2_11_1)
|
||||||
(cd $REL/.. && mvn -q verify -B -am -Dmaven.javadoc.skip -Dcheckstyle.skip -pl :taskana-core)
|
set -x
|
||||||
|
eval "$REL/prepare_db.sh '$1'"
|
||||||
|
mvn -q verify -B -f $REL/.. -am -T 4C -Dmaven.javadoc.skip -Dcheckstyle.skip -pl :taskana-core
|
||||||
;;
|
;;
|
||||||
POSTGRES_10_4)
|
POSTGRES_10_4)
|
||||||
|
set -x
|
||||||
|
eval "$REL/prepare_db.sh '$1'"
|
||||||
### INSTALL ###
|
### INSTALL ###
|
||||||
(cd $REL/.. && mvn -q install -B -DskipTests -Dmaven.javadoc.skip -Dcheckstyle.skip -P postgres -am -T 4C -pl :taskana-rest-spring-wildfly-example)
|
mvn -q install -B -f $REL/.. -P postgres -am -T 4C -pl :taskana-rest-spring-wildfly-example -DskipTests -Dmaven.javadoc.skip -Dcheckstyle.skip
|
||||||
|
|
||||||
### TEST ###
|
### TEST ###
|
||||||
(cd $REL/.. && mvn -q verify -B -Dmaven.javadoc.skip -Dcheckstyle.skip -pl :taskana-core)
|
mvn -q verify -B -f $REL/.. -Dmaven.javadoc.skip -Dcheckstyle.skip -pl :taskana-core
|
||||||
(cd $REL/../rest/taskana-rest-spring-wildfly-example && mvn -q verify -B -P postgres -Dmaven.javadoc.skip -Dcheckstyle.skip)
|
# Same as above (H2) we can not use the fancy '-f' maven option
|
||||||
|
(cd $REL/.. && mvn -q verify -B -pl :taskana-rest-spring-wildfly-example -P postgres -Dmaven.javadoc.skip -Dcheckstyle.skip)
|
||||||
|
;;
|
||||||
|
HISTORY)
|
||||||
|
set -x
|
||||||
|
### INSTALL ###
|
||||||
|
mvn -q install -B -f $REL/.. -am -T 4C -pl :taskana-rest-spring -DskipTests -Dmaven.javadoc.skip -Dcheckstyle.skip
|
||||||
|
|
||||||
|
### TEST ###
|
||||||
|
mvn -q verify -B -f $REL/../history -Dmaven.javadoc.skip -Dcheckstyle.skip
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue