fix(kube): replace special caracters in branch name

This commit is contained in:
Philippe Caseiro 2023-06-19 16:37:59 +02:00
parent 418891082a
commit bad27aa934
1 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ String buildAndPublishImage(Map options = [:]) {
stage("Build image '${imageName}:${imageTag}'") {
git.withHTTPCredentials(gitCredentialsId) {
sh """
CURRENT_BRANCH=${BRANCH_NAME} make
CURRENT_BRANCH=$( echo ${BRANCH_NAME} | | tr -c '[:alnum:]\n\r' '_'| tr '[:upper:]' '[:lower:]') make
"""
}
}
@ -62,7 +62,7 @@ String buildAndPublishImage(Map options = [:]) {
utils.when(!dryRun) {
retry(2) {
sh """
CURRENT_BRANCH=${BRANCH_NAME} make release
CURRENT_BRANCH=$( echo ${BRANCH_NAME} | | tr -c '[:alnum:]\n\r' '_'| tr '[:upper:]' '[:lower:]') make
"""
}
}