Commit 6669596a authored by daidekun's avatar daidekun

fixbugs

parent 22e06785
...@@ -14,6 +14,7 @@ def build(namespace, systemName, contextDir) { ...@@ -14,6 +14,7 @@ def build(namespace, systemName, contextDir) {
def docker_build_and_push(buildNumber, branchName, contextDir) { def docker_build_and_push(buildNumber, branchName, contextDir) {
/*分支名中非法字符统一替换为下划线*/ /*分支名中非法字符统一替换为下划线*/
imageTag = "192.168.4.36/${harborGroup}/${systemName}:${safeBranchName}-${buildNumber}"
regex = "[`,./;\\[\\]&<>?:\"()|-]+" regex = "[`,./;\\[\\]&<>?:\"()|-]+"
safeBranchName = branchName.replaceAll(regex,"_") safeBranchName = branchName.replaceAll(regex,"_")
safeSystemName = "project" safeSystemName = "project"
...@@ -28,6 +29,8 @@ def docker_build_and_push(buildNumber, branchName, contextDir) { ...@@ -28,6 +29,8 @@ def docker_build_and_push(buildNumber, branchName, contextDir) {
echo "=================镜像地址=================" echo "=================镜像地址================="
echo imageTag echo imageTag
echo "=========================================" echo "========================================="
return imageTag
} }
def deploy(namespace, systemName, imageTag, isDeploy) { def deploy(namespace, systemName, imageTag, isDeploy) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment