From 3b4e970ce18dfa0517add64b8bd3f2c8da4cfa38 Mon Sep 17 00:00:00 2001
From: lewa <lene.wasskog@nibio.no>
Date: Wed, 10 Jan 2024 14:03:09 +0100
Subject: [PATCH] chore: Build pom with models before deploy

---
 .gitlab-ci.yml | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index dc356ea..625de36 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -30,9 +30,7 @@ before_script:
   - git config --global user.email "${GITLAB_USER_EMAIL}"
   - echo "Get common settings"
   - git clone $COMMON_CONFIG_REMOTE $COMMON_CONFIG_LOCAL
-  - cd $COMMON_CONFIG_LOCAL
-  - cp $SETTINGS_XML ../$SETTINGS_XML
-  - cd ..
+  - cp $COMMON_CONFIG_LOCAL/$SETTINGS_XML .
   - rm -rf $COMMON_CONFIG_LOCAL
   - apt-get update -y && apt-get install -y python3 && apt-get install -y rsync openssh-client
   - "python3 build_pom_with_models.py"
@@ -218,6 +216,7 @@ upload-and-tag-release:
     - git stash pop
 
     # Set release version and deploy. Commit, tag and push.
+    - "python3 build_pom_with_models.py"
     - export RELEASE_VERSION=$(./mvnw $MAVEN_POM_WITH_MODELS $MAVEN_CLI_OPTS $MAVEN_OPTS --batch-mode --no-transfer-progress --non-recursive help:evaluate -Dexpression=project.version | grep -v "\[.*")
     - export RELEASE_TAG="v${RELEASE_VERSION}"
     - echo "Version to deploy '$RELEASE_VERSION', will be tagged '$RELEASE_TAG'"
-- 
GitLab