From 83201316fc6900cca10513c7e615a25ce4efc041 Mon Sep 17 00:00:00 2001
From: Felix Reichenbach <felix.reichenbach@mgm-tp.com>
Date: Wed, 15 Jan 2025 11:55:17 +0100
Subject: [PATCH] reduce max length in Jenkinsfile

---
 Jenkinsfile | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index e43ba8c7..a1c302e7 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -56,10 +56,10 @@ pipeline {
                 }
                 configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
                     sh "mvn -s $MAVEN_SETTINGS versions:set -DnewVersion=${JAR_TAG} -DprocessAllModules=true"
-                    
+
                 }
           }
-        }   
+        }
 
         stage('Build Administration') {
             steps {
@@ -72,7 +72,7 @@ pipeline {
                 }
             }
         }
-        
+
         stage('Deploy to Nexus'){
             steps {
                 script {
@@ -128,7 +128,7 @@ pipeline {
                 script {
                     FAILED_STAGE=env.STAGE_NAME
                 }
-                
+
                 configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
                     withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) {
                         sh 'mvn -s $MAVEN_SETTINGS spring-boot:build-image -DskipTests -Dmaven.wagon.http.retryHandler.count=3 $BUILD_PROFILE -Ddocker.publishRegistry.username=${USER} -Ddocker.publishRegistry.password=${PASSWORD} -Dbuild.number=$BUILD_NUMBER -DimageTag=$IMAGE_TAG -DpublishImage=true'
@@ -136,7 +136,7 @@ pipeline {
                 }
             }
         }
-        
+
         stage('Test, build and deploy Helm Chart') {
             steps {
                 script {
@@ -190,7 +190,7 @@ pipeline {
             }
         }
     }
-    
+
     post {
         always{
             junit testResults: '**/target/surefire-reports/*.xml', skipPublishingChecks: true
@@ -225,7 +225,7 @@ String getHelmRepository(){
 }
 
 String validateBranchName(branchName) {
-    int maxLength = 30
+    int maxLength = 20
     if (branchName.length() > maxLength) {
         String originalBranchName = branchName
         branchName = branchName.substring(0, maxLength)
@@ -284,7 +284,7 @@ String getRoom() {
         return "!oWZpUGTFsxkJIYNfYg:matrix.ozg-sh.de"
     } else {
         return "!iQPAvQIiRwRpNOszjw:matrix.ozg-sh.de"
-    } 
+    }
 }
 
 Void configureGit() {
-- 
GitLab