From 62c5525b9c54a30ff2ab6e818db5fa1da589b1a2 Mon Sep 17 00:00:00 2001
From: Brita Linnestad <brita.linnestad@nibio.no>
Date: Tue, 5 Sep 2023 12:51:30 +0000
Subject: [PATCH] Update .gitlab-ci.yml file, add verify_model_applescabm

---
 .gitlab-ci.yml | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a79c489..1a9c0f3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -10,9 +10,9 @@ variables:
   MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository -Dmaven.artifact.threads=10"
   MAIN_BRANCH: "main"
   RELEASE_BRANCH: "release"
+  APPLESCABM_PROJECT_ID: "20"
   MAMESTRABR_PROJECT_ID: "31"
   PSILARTEMP_PROJECT_ID: "37"
-  APPLESCABM_PROJECT_ID: "20"
 cache:
   paths:
     - .m2/repository/
@@ -44,6 +44,18 @@ deploy-snapshot:
 
 # Runs after new SNAPSHOT is deployed to package registry. Triggers job on main branch in model repo,
 # which builds model with the new version of VIPSCommon. This pipeline fails if model build fails.
+verify_model_APPLESCABM:
+  stage: verify
+  image: registry.gitlab.com/finestructure/pipeline-trigger
+  script:
+    - apk add --no-cache openjdk11
+    - export PROJECT_VERSION=$(./mvnw --batch-mode --no-transfer-progress --non-recursive help:evaluate -Dexpression=project.version | grep -v "\[.*")
+    - trigger -h gitlab.nibio.no -a "$CICD_API_TOKEN" -p "$ACCESS_TOKEN_APPLESCABM" -t $MAIN_BRANCH $APPLESCABM_PROJECT_ID -e VERSION=$PROJECT_VERSION
+  tags:
+    - vips-java
+  rules:
+    - if: '$CI_COMMIT_REF_NAME == $MAIN_BRANCH'
+
 verify_model_MAMESTRABR:
   stage: verify
   image: registry.gitlab.com/finestructure/pipeline-trigger
-- 
GitLab