mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-08 05:11:04 +00:00
Fixed remote-deploy functionality
This commit is contained in:
1 parent
cbad60055f
commit
4e6645ed04
1 file changed
+7
-16
@@ -79,7 +79,7 @@ if [ $# -eq 0 ]; then
|
||||
echo "-n <package name> Name of the bundle you want to hot deploy. Needs fully qualified name like"
|
||||
echo " com.sap.sailing.monitoring. Only works if there is a fully built server available."
|
||||
echo "-l <telnet port> Telnet port the OSGi server is running. Optional but enables fully automatic hot-deploy."
|
||||
echo "-s <target server> Name of server you want to use as target for install or hot-deploy. This overrides default behaviour."
|
||||
echo "-s <target server> Name of server you want to use as target for install, hot-deploy or remote-reploy. This overrides default behaviour."
|
||||
echo "-w <ssh target> Target for remote-deploy. Must comply with the following format: user@server."
|
||||
echo ""
|
||||
echo "build: builds the server code using Maven to $PROJECT_HOME (log to $START_DIR/build.log)"
|
||||
@@ -89,8 +89,8 @@ if [ $# -eq 0 ]; then
|
||||
echo "hot-deploy: performs hot deployment of named bundle into OSGi server"
|
||||
echo "Example: $0 -n com.sap.sailing.www -l 14888 hot-deploy"
|
||||
echo ""
|
||||
echo "remote-deploy: performs hot deployment of named bundle into OSGi server"
|
||||
echo "Example: $0 -w trac@sapsailing.com remote-deploy"
|
||||
echo "remote-deploy: performs hot deployment of the java code to a remote server"
|
||||
echo "Example: $0 -s dev -w trac@sapsailing.com remote-deploy"
|
||||
echo ""
|
||||
echo "Active branch is $active_branch"
|
||||
echo "Project home is $PROJECT_HOME"
|
||||
@@ -130,7 +130,7 @@ echo INSTALL goes to $ACDIR
|
||||
shift $((OPTIND-1))
|
||||
|
||||
if [[ $@ == "" ]]; then
|
||||
echo "You need to specify an action [build|install|all|hot-deploy]"
|
||||
echo "You need to specify an action [build|install|all|hot-deploy|remote-deploy]"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
@@ -402,16 +402,7 @@ if [[ "$@" == "install" ]] || [[ "$@" == "all" ]]; then
|
||||
fi
|
||||
|
||||
if [[ "$@" == "remote-deploy" ]]; then
|
||||
read -s -n1 -p "Which server do you want to deploy ([d]ev,[t]est,[p]rod1,p[r]od2): " answer
|
||||
case $answer in
|
||||
"D" | "d") SERVER="dev";;
|
||||
"T" | "t") SERVER="test";;
|
||||
"P" | "p") SERVER="prod1";;
|
||||
"R" | "r") SERVER="prod2";;
|
||||
*) echo "Aborting..."
|
||||
exit;;
|
||||
esac
|
||||
|
||||
SERVER=$TARGET_SERVER_NAME
|
||||
echo "Will deploy server $SERVER"
|
||||
|
||||
read -s -n1 -p "Did you want me to start a LOCAL build (without tests) for $SERVERS_HOME/$SERVER before deploying (y/n)? " answer
|
||||
@@ -469,8 +460,8 @@ if [[ "$@" == "remote-deploy" ]]; then
|
||||
esac
|
||||
|
||||
echo ""
|
||||
$SSH_CMD "$REMOTE_SERVER/stop"
|
||||
$SSH_CMD "$REMOTE_SERVER/start"
|
||||
$SSH_CMD "cd $REMOTE_SERVER && $REMOTE_SERVER/stop"
|
||||
$SSH_CMD "cd $REMOTE_SERVER && $REMOTE_SERVER/start"
|
||||
|
||||
echo "Restarted remote server. Please check."
|
||||
fi
|
||||
Reference in new issue
Block a user