Commit 92f14257 authored by daidekun's avatar daidekun

名称

parent 94c9d2ed
...@@ -224,14 +224,16 @@ def build_luaui(namespace, systemNames, contextDir) { ...@@ -224,14 +224,16 @@ def build_luaui(namespace, systemNames, contextDir) {
def dockerbuild_and_push(timeNow, buildNumber, branchName, harborGroup, systemName, contextDir) { def dockerbuild_and_push(timeNow, buildNumber, branchName, harborGroup, systemName, contextDir) {
regex = "[`,./;\\[\\]&<>?:\"()|-]+" regex = "[`,./;\\[\\]&<>?:\"()|-]+"
k8sSystemName = systemName.replaceAll("_","-")
safeBranchName = branchName.replaceAll(regex,"_") safeBranchName = branchName.replaceAll(regex,"_")
safeSystemName = "project" defaultSystemName = "project"
imageTag = "192.168.4.36/${harborGroup}/${systemName}:${safeBranchName}-${buildNumber}" imageTag = "192.168.4.36/${harborGroup}/${k8sSystemName}:${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"]) {
def image = docker.build(imageTag, "--build-arg BUILD_TIME=${timeNow} --build-arg BUILD_NUMBER=${buildNumber} --build-arg SYSTEM_NAME=${systemName} --build-arg BRANCH_NAME=${branchName} --build-arg SAFE_SYSTEM_NAME=${safeSystemName} ${contextDir}") def image = docker.build(imageTag, "--build-arg BUILD_TIME=${timeNow} --build-arg BUILD_NUMBER=${buildNumber} --build-arg SYSTEM_NAME=${systemName} --build-arg BRANCH_NAME=${branchName} --build-arg SAFE_SYSTEM_NAME=${defaultSystemName} ${contextDir}")
image.push() image.push()
if (branchName == "master" || branchName == "master--master") { if (branchName == "master" || branchName == "master--master") {
......
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