diff --git a/publish-custom-image.sh b/publish-custom-image.sh index 08f7342d..b3b29cb9 100755 --- a/publish-custom-image.sh +++ b/publish-custom-image.sh @@ -9,11 +9,14 @@ gradle assemble # Get the current Git branch branch=$(git rev-parse --abbrev-ref HEAD) +# Replace any slashes (e.g., in 'feature/' or 'release/') with a hyphen +cleaned_branch=$(echo "$branch" | sed 's/\//_/g') + # Get the short commit hash (first 5 characters) commit_hash=$(git rev-parse --short=5 HEAD) # Combine branch and commit hash -buildName="${USER}-${branch}-${commit_hash}" +buildName="${USER}-${cleaned_branch}-${commit_hash}" gradle bootBuildImage --publishImage -PbuildbootDockerHostNetwork=true -Pversion=${buildName} diff --git a/redaction-service-v1/redaction-service-server-v1/build.gradle.kts b/redaction-service-v1/redaction-service-server-v1/build.gradle.kts index 80302e7b..8896590a 100644 --- a/redaction-service-v1/redaction-service-server-v1/build.gradle.kts +++ b/redaction-service-v1/redaction-service-server-v1/build.gradle.kts @@ -129,6 +129,7 @@ tasks.named("bootBuildImage") { "BPE_APPEND_JAVA_TOOL_OPTIONS", "-XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8 -Dkie.repository.project.cache.size=50 -Dkie.repository.project.versions.cache.size=5" ) + environment.put("BPE_DEFAULT_LANG", "en_US.utf8") // java.text.Normalizer does not care for file.encoding imageName.set("nexus.knecon.com:5001/red/${project.name}")// must build image with same name always, otherwise the builder will not know which image to use as cache. DO NOT CHANGE! if (project.hasProperty("buildbootDockerHostNetwork")) {