Commit d55d0405 authored by daidekun's avatar daidekun

fix

parent ba8504d6
...@@ -17,10 +17,10 @@ def build(namespace, systemName, contextDir) { ...@@ -17,10 +17,10 @@ def build(namespace, systemName, contextDir) {
def docker_build_and_push(buildNumber, branchName, harborGroup, systemName, contextDir) { def docker_build_and_push(buildNumber, branchName, harborGroup, systemName, contextDir) {
/*分支名中非法字符统一替换为下划线*/ /*分支名中非法字符统一替换为下划线*/
imageTag = "192.168.4.36/${harborGroup}/${systemName}:${safeBranchName}-${buildNumber}"
regex = "[`,./;\\[\\]&<>?:\"()|-]+" regex = "[`,./;\\[\\]&<>?:\"()|-]+"
safeBranchName = branchName.replaceAll(regex,"_") safeBranchName = branchName.replaceAll(regex,"_")
safeSystemName = "project" safeSystemName = "project"
imageTag = "192.168.4.36/${harborGroup}/${systemName}:${safeBranchName}-${buildNumber}"
withDockerServer([uri: "tcp://192.168.4.96:2375/"]) { withDockerServer([uri: "tcp://192.168.4.96:2375/"]) {
withDockerRegistry([credentialsId: 'harbor-qajenkins', url: "http://192.168.4.36"]) { withDockerRegistry([credentialsId: 'harbor-qajenkins', url: "http://192.168.4.36"]) {
......
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