TSK-456: configured deployment of taskana-web

This commit is contained in:
Mustapha Zorgati 2018-04-30 11:44:12 +02:00 committed by Holger Hagen
parent e45c7fab63
commit 0062d89aae
4 changed files with 51 additions and 27 deletions

View File

@ -12,7 +12,7 @@ cache:
before_install: before_install:
- nvm install $NODE_VERSION - nvm install $NODE_VERSION
- npm install -g @angular/cli >/dev/null 2>&1 - npm install -g @angular/cli >/dev/null 2>&1
- lib/deployment/change_version.sh rest/ lib/ web/ - lib/deployment/change_version.sh -m "rest/ lib/ web/" -swarm lib/taskana-cdi/src/test/java/pro/taskana/TaskanaProducersTest.java
install: install:
- (cd web && npm install --no-progress && npm run build:prod) - (cd web && npm install --no-progress && npm run build:prod)
&& mvn clean install -q -f lib/ -DskipTests=true -Dmaven.javadoc.skip=true -B && mvn clean install -q -f lib/ -DskipTests=true -Dmaven.javadoc.skip=true -B

View File

@ -27,18 +27,54 @@ function helpAndExit {
# $1: directory of pom # $1: directory of pom
# $2: new version # $2: new version
function change_version { function change_version {
$debug mvn org.codehaus.mojo:versions-maven-plugin:2.5:set -f "$1" -DnewVersion="$2" -DartifactId=* -DgroupId=* mvn org.codehaus.mojo:versions-maven-plugin:2.5:set -f "$1" -DnewVersion="$2" -DartifactId=* -DgroupId=*
} }
function main { function main {
if [[ $# -eq 0 || "$1" == "-h" || "$1" == "--help" ]]; then if [[ $# -eq 0 || "$1" == "-h" || "$1" == "--help" ]]; then
helpAndExit 0 helpAndExit 0
fi fi
if [[ "$TRAVIS_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
while [[ $# -gt 0 ]]; do while [[ $# -gt 0 ]]; do
change_version "$1" "${TRAVIS_TAG##v}" case $1 in
shift -m|--modules)
if [[ -z "$2" || "$2" == -* ]]; then
echo "missing parameter for argument '-m|--modules'" >&2
exit 1
fi
MODULES=($2)
shift # past argument
shift # past value
;;
-swarm)
if [[ -z "$2" || "$2" == -* ]]; then
echo "missing parameter for argument '-swarm'" >&2
exit 1
fi
SWARM="$2"
shift # past argument
shift # past value
;;
*) # unknown option
echo "unknown parameter $1" >&2
exit 1
;;
esac
done done
if [[ ${#MODULES[@]} -eq 0 ]]; then
echo "Can not perform deployment without any modules" >&2
helpAndExit 1
fi
if [[ "$TRAVIS_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
for dir in ${MODULES[@]}; do
change_version "$dir" "${TRAVIS_TAG##v}"
done
if [[ -n "$SWARM" ]]; then
sed -i "s/pro.taskana:taskana-core.*-SNAPSHOT/pro.taskana:taskana-core:${TRAVIS_TAG##v}/" "$SWARM"
fi
else else
echo "skipped version change because this is not a release build" echo "skipped version change because this is not a release build"
fi fi

View File

@ -5,20 +5,8 @@ applications:
buildpack: https://github.com/cloudfoundry/java-buildpack.git#v3.10 buildpack: https://github.com/cloudfoundry/java-buildpack.git#v3.10
memory: 512M memory: 512M
disk_quota: 256M disk_quota: 256M
- name: taskana-workplace - name: taskana-web
path: workplace/dist
buildpack: https://github.com/cloudfoundry/staticfile-buildpack.git#v1.3.16
memory: 16M
disk_quota: 64M
- name: taskana-admin
path: web/dist path: web/dist
buildpack: https://github.com/cloudfoundry/staticfile-buildpack.git#v1.3.16 buildpack: https://github.com/cloudfoundry/staticfile-buildpack.git#v1.3.16
memory: 16M memory: 16M
disk_quota: 64M disk_quota: 64M
- name: taskana-monitor
path: monitor/dist
buildpack: https://github.com/cloudfoundry/staticfile-buildpack.git#v1.3.16
memory: 16M
disk_quota: 64M

View File

@ -1,4 +1,4 @@
export const environment = { export const environment = {
production: true, production: true,
taskanaRestUrl: 'http://taskana-rest.mybluemix.net' taskanaRestUrl: 'https://taskana-rest.mybluemix.net'
}; };