Skip to content
Snippets Groups Projects
Commit b95be038 authored by Lene Wasskog's avatar Lene Wasskog
Browse files

chore: Stop wildfly before copying file

parent 14d4d5ea
Branches
Tags
1 merge request!7Gnuaffero
Pipeline #2458 failed
...@@ -41,8 +41,10 @@ deploy-to-staging: ...@@ -41,8 +41,10 @@ deploy-to-staging:
- "./mvnw $MAVEN_POM_WITH_MODELS $MAVEN_CLI_OPTS $MAVEN_OPTS package -DskipTests" - "./mvnw $MAVEN_POM_WITH_MODELS $MAVEN_CLI_OPTS $MAVEN_OPTS package -DskipTests"
- WAR_FILE=$(find target -maxdepth 1 -type f -name "*.war" | sort -n | tail -1) - WAR_FILE=$(find target -maxdepth 1 -type f -name "*.war" | sort -n | tail -1)
- if [ -z "$WAR_FILE" ]; then echo "No WAR files found in target directory"; exit 1; fi - if [ -z "$WAR_FILE" ]; then echo "No WAR files found in target directory"; exit 1; fi
- echo "Deploying $WAR_FILE to $SERVER_IP" - echo "Stop server"
- rsync -rav --delete "$WAR_FILE" $SERVER_USER@$SERVER_IP:/home/deployer/ - ssh $SERVER_USER@$SERVER_IP "sudo systemctl stop wildfly"
- echo "Deploying $WAR_FILE to server"
- scp "$WAR_FILE" $SERVER_USER@$SERVER_IP:/home/deployer/
tags: tags:
- vips-java - vips-java
rules: rules:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment