From 64c53b029022adc8cfc76c67ee95f43c07c1735d Mon Sep 17 00:00:00 2001 From: lewa <lene.wasskog@nibio.no> Date: Mon, 18 Sep 2023 14:25:02 +0200 Subject: [PATCH] build: Ensure war file is built before deploy --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d06c8d0..8cc6b02 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -55,6 +55,7 @@ deploy-to-staging: - cp "$SSH_KNOWN_HOSTS" ~/.ssh/known_hosts - chmod 644 ~/.ssh/known_hosts #- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config + - './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) - if [ -z "$WAR_FILE" ]; then echo "No WAR files found in target directory"; exit 1; fi - echo "Deploying $WAR_FILE to the server" -- GitLab