Commit b0253190 authored by wentao.suo's avatar wentao.suo

change dockerbuild_and_push buildNumber to date String

parent 92f14257
...@@ -228,8 +228,10 @@ def dockerbuild_and_push(timeNow, buildNumber, branchName, harborGroup, systemNa ...@@ -228,8 +228,10 @@ def dockerbuild_and_push(timeNow, buildNumber, branchName, harborGroup, systemNa
k8sSystemName = systemName.replaceAll("_","-") k8sSystemName = systemName.replaceAll("_","-")
safeBranchName = branchName.replaceAll(regex,"_") safeBranchName = branchName.replaceAll(regex,"_")
defaultSystemName = "project" defaultSystemName = "project"
timeStemp = new Date().format("yyyyMMddHHmmss")
imageTag = "192.168.4.36/${harborGroup}/${k8sSystemName}:${safeBranchName}-${buildNumber}" imageTag = "192.168.4.36/${harborGroup}/${k8sSystemName}:${safeBranchName}-${timeStemp}"
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