diff --git a/build.sh b/build.sh index df5bbf20333eaed372c97dbfa66342eb59e533b1..304e42a64be5c418ea98d2945c729c010dfa3f43 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,24 @@ #!/bin/sh +# ========================================================= +# CONFIGURATION +# ========================================================= + +# configuration for remote deploy, requirements: +# * curl +# * a recent tomcat server is required (8+) +# * a user that is allowed to deploy, with following roles: tomcat, manager-gui, manager-script, manager-jmx, manager-status +# * installed and running tomcat manager application +DEPLOY="true" +TOMCAT_HOST="localhost" +TOMCAT_PORT="8000" +TOMCAT_USER="tomcat" +TOMCAT_PW="tomcat" + +# ========================================================= +# DO NOT EDIT AFTER THIS POINT +# ========================================================= + LOG="build.log" rm -f $LOG @@ -56,11 +75,13 @@ if [ $? -ne 0 ]; then exit 1 fi -echo "" >> $LOG -echo "-------------------------------" >> $LOG -echo "deploying vipra-rest" | tee -a $LOG -echo "-------------------------------" >> $LOG -curl 'http://tomcat:tomcat@localhost:8000/manager/text/deploy?path=/vipra-rest&update=true' --upload-file ./vipra-rest/target/vipra-rest.war >> $LOG 2>&1 +if [ $DEPLOY = "true" ]; then + echo "" >> $LOG + echo "-------------------------------" >> $LOG + echo "deploying vipra-rest" | tee -a $LOG + echo "-------------------------------" >> $LOG + curl "http://$TOMCAT_USER:TOMCAT_PW@$TOMCAT_HOST:$TOMCAT_PORT/manager/text/deploy?path=/vipra-rest&update=true" --upload-file ./vipra-rest/target/vipra-rest.war >> $LOG 2>&1 +fi echo "complete" exit $?