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

Merge branch 'reduce_branch_name_length' into 'main'

reduce branch name length to 20 characters

See merge request !3
parents 2edc5cf4 697e6090
Branches
Tags
1 merge request!3reduce branch name length to 20 characters
...@@ -270,7 +270,7 @@ void deployHelmChart(String helmChartName, String helmChartVersion) { ...@@ -270,7 +270,7 @@ void deployHelmChart(String helmChartName, String helmChartVersion) {
} }
def validateBranchName(branchName) { def 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 buildVersionName(String pomFile) { ...@@ -284,7 +284,7 @@ String buildVersionName(String pomFile) {
if (isReleaseBranch()) { if (isReleaseBranch()) {
return getPomVersion(pomFile) return getPomVersion(pomFile)
} }
return "${getPomVersion(pomFile)}-${validateBranchName(env.BRANCH_NAME)}-${env.GIT_COMMIT.take(7)}".replaceAll("_", "-") return "${getPomVersion(pomFile)}-${validateBranchName(env.BRANCH_NAME)}-${env.BUILD_NUMBER}".replaceAll("_", "-")
} }
Void tagAndPushDockerImage(String imageName, String newTag){ Void tagAndPushDockerImage(String imageName, String newTag){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment