From d968b7d5d5ab45722b798ec0c6e66a31bd373211 Mon Sep 17 00:00:00 2001 From: lewa <lene.wasskog@nibio.no> Date: Tue, 28 Nov 2023 14:11:59 +0100 Subject: [PATCH] chore: Set war file as artifact from build stage, skip building in deploy stage --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2c8bb17..625385c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -41,6 +41,9 @@ build: - "./mvnw $MAVEN_POM_WITH_MODELS $MAVEN_CLI_OPTS $MAVEN_OPTS package -DskipTests" tags: - vips-java + artifacts: + paths: + - target/*.war test: stage: test @@ -56,7 +59,6 @@ deploy-to-staging: - echo "$SSH_PRIVATE_KEY" >> ~/.ssh/id_dsa - chmod 600 ~/.ssh/id_dsa - 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 | xargs basename) - if [ -z "$WAR_FILE" ]; then echo "No war file found in target directory"; exit 1; fi - echo "Create temporary directory on the server" -- GitLab