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:
- nvm install $NODE_VERSION
- 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:
- (cd web && npm install --no-progress && npm run build:prod)
&& mvn clean install -q -f lib/ -DskipTests=true -Dmaven.javadoc.skip=true -B

View File

@ -27,21 +27,57 @@ function helpAndExit {
# $1: directory of pom
# $2: new 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 {
if [[ $# -eq 0 || "$1" == "-h" || "$1" == "--help" ]]; then
helpAndExit 0
fi
if [[ "$TRAVIS_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
while [[ $# -gt 0 ]]; do
change_version "$1" "${TRAVIS_TAG##v}"
shift
done
else
echo "skipped version change because this is not a release build"
fi
if [[ $# -eq 0 || "$1" == "-h" || "$1" == "--help" ]]; then
helpAndExit 0
fi
while [[ $# -gt 0 ]]; do
case $1 in
-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
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
echo "skipped version change because this is not a release build"
fi
}
main "$@"

View File

@ -5,20 +5,8 @@ applications:
buildpack: https://github.com/cloudfoundry/java-buildpack.git#v3.10
memory: 512M
disk_quota: 256M
- name: taskana-workplace
path: workplace/dist
buildpack: https://github.com/cloudfoundry/staticfile-buildpack.git#v1.3.16
memory: 16M
disk_quota: 64M
- name: taskana-admin
- name: taskana-web
path: web/dist
buildpack: https://github.com/cloudfoundry/staticfile-buildpack.git#v1.3.16
memory: 16M
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 = {
production: true,
taskanaRestUrl: 'http://taskana-rest.mybluemix.net'
taskanaRestUrl: 'https://taskana-rest.mybluemix.net'
};