From e0784a56ec6cde909bcc2e73bcc3426fa040de2e Mon Sep 17 00:00:00 2001
From: OZGCloud <ozgcloud@mgm-tp.com>
Date: Tue, 9 Jul 2024 17:06:44 +0200
Subject: [PATCH] OZG-5907 update jenkinsfile

---
 Jenkinsfile | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index e30d9c81a7..c28bf0d2fa 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -106,7 +106,7 @@ pipeline {
           }
         }
 
-        stage('Server') {
+        stage('Build Server artefacts, build and push docker image') {
             steps {
                 script {
                     FAILED_STAGE=env.STAGE_NAME
@@ -155,13 +155,16 @@ pipeline {
             }
         }
         stage('Tag and Push Docker Image') {
+            when {
+                anyOf {
+                    branch 'master'
+                    branch 'release'
+                }
+            }
          
             steps {
                 script {
                     FAILED_STAGE = env.STAGE_NAME
-                    IMAGE_TAG = generateImageTag()
-
-                    tagAndPushDockerImage(IMAGE_TAG)
 
                     if (isMasterBranch()) {
                         tagAndPushDockerImage('snapshot-latest')
-- 
GitLab