Skip to content
Snippets Groups Projects
Commit 83201316 authored by Felix Reichenbach's avatar Felix Reichenbach
Browse files

reduce max length in Jenkinsfile

parent 90019666
No related branches found
Tags
1 merge request!1Ozg 6741 organisationseinheit link
...@@ -56,10 +56,10 @@ pipeline { ...@@ -56,10 +56,10 @@ pipeline {
} }
configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) { configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
sh "mvn -s $MAVEN_SETTINGS versions:set -DnewVersion=${JAR_TAG} -DprocessAllModules=true" sh "mvn -s $MAVEN_SETTINGS versions:set -DnewVersion=${JAR_TAG} -DprocessAllModules=true"
} }
} }
} }
stage('Build Administration') { stage('Build Administration') {
steps { steps {
...@@ -72,7 +72,7 @@ pipeline { ...@@ -72,7 +72,7 @@ pipeline {
} }
} }
} }
stage('Deploy to Nexus'){ stage('Deploy to Nexus'){
steps { steps {
script { script {
...@@ -128,7 +128,7 @@ pipeline { ...@@ -128,7 +128,7 @@ pipeline {
script { script {
FAILED_STAGE=env.STAGE_NAME FAILED_STAGE=env.STAGE_NAME
} }
configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) { configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) { 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' 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 { ...@@ -136,7 +136,7 @@ pipeline {
} }
} }
} }
stage('Test, build and deploy Helm Chart') { stage('Test, build and deploy Helm Chart') {
steps { steps {
script { script {
...@@ -190,7 +190,7 @@ pipeline { ...@@ -190,7 +190,7 @@ pipeline {
} }
} }
} }
post { post {
always{ always{
junit testResults: '**/target/surefire-reports/*.xml', skipPublishingChecks: true junit testResults: '**/target/surefire-reports/*.xml', skipPublishingChecks: true
...@@ -225,7 +225,7 @@ String getHelmRepository(){ ...@@ -225,7 +225,7 @@ String getHelmRepository(){
} }
String validateBranchName(branchName) { String validateBranchName(branchName) {
int maxLength = 30 int maxLength = 20
if (branchName.length() > maxLength) { if (branchName.length() > maxLength) {
String originalBranchName = branchName String originalBranchName = branchName
branchName = branchName.substring(0, maxLength) branchName = branchName.substring(0, maxLength)
...@@ -284,7 +284,7 @@ String getRoom() { ...@@ -284,7 +284,7 @@ String getRoom() {
return "!oWZpUGTFsxkJIYNfYg:matrix.ozg-sh.de" return "!oWZpUGTFsxkJIYNfYg:matrix.ozg-sh.de"
} else { } else {
return "!iQPAvQIiRwRpNOszjw:matrix.ozg-sh.de" return "!iQPAvQIiRwRpNOszjw:matrix.ozg-sh.de"
} }
} }
Void configureGit() { Void configureGit() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment