Commit 6acb99d7 authored by 智勇's avatar 智勇

tag name tkeCode

parent 3116f431
...@@ -18,10 +18,14 @@ def contextMkdir(key) { ...@@ -18,10 +18,14 @@ def contextMkdir(key) {
return contextDir return contextDir
} }
def imageTag(harborGroup,k8sSystemName,safeBranchName,tagName){ def imageTag(harborGroup,k8sSystemName,safeBranchName,tagName,imageType){
def imageTag4_4=[:] def imageTag4_4=[:]
imageTag4_4["harborHost"]="http://192.168.4.4" imageTag4_4["harborHost"]="http://192.168.4.4"
imageTag4_4["imageTag"] = "192.168.4.4/${harborGroup}/${k8sSystemName}:tke-${safeBranchName}-${tagName}" if(imageType=="test"){
imageTag4_4["imageTag"] = "192.168.4.4/${harborGroup}/${k8sSystemName}:tke${safeBranchName}-${tagName}"
}else{
imageTag4_4["imageTag"] = "192.168.4.4/${harborGroup}/${k8sSystemName}:tkeCode${safeBranchName}-${tagName}"
}
return [ imageTag4_4 ] return [ imageTag4_4 ]
} }
......
...@@ -83,7 +83,7 @@ def call(body) { ...@@ -83,7 +83,7 @@ def call(body) {
def k8sSystemName = originSystemName.replaceAll("_","-").toLowerCase() def k8sSystemName = originSystemName.replaceAll("_","-").toLowerCase()
def safeBranchName = originBranchName.replaceAll(regex,"_").toLowerCase() def safeBranchName = originBranchName.replaceAll(regex,"_").toLowerCase()
imageTagInfos = _stage.imageTag(harborGroup,k8sSystemName,safeBranchName,timeStemp) imageTagInfos = _stage.imageTag(harborGroup,k8sSystemName,safeBranchName,timeStemp,imageType)
for (imageTagInfo in imageTagInfos){ for (imageTagInfo in imageTagInfos){
_stage.dockerbuild_and_push(imageTagInfo,buildNumber,originSystemName,originBranchName ,cluster,timeStemp,contextDir,branchHashCode) _stage.dockerbuild_and_push(imageTagInfo,buildNumber,originSystemName,originBranchName ,cluster,timeStemp,contextDir,branchHashCode)
......
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