Commit 69336e6d authored by wentao.suo's avatar wentao.suo

fix

parent f730ee0e
......@@ -470,14 +470,11 @@ def deploy(namespace, systemName, imageTag, tier, isDeploy) {
return imageTag
}*/
def clean_images(imageTagInfos,contextDir) {
def clean_images(imageTag,contextDir) {
sh "rm -rf ${contextDir}"
for (imageTagInfo in imageTagInfos){
if (imageTag){
sh "docker rmi -f \$(docker images -q ${imageTag})"
if (imageTagInfo["imageTag"]){
imageTag = imageTagInfo["imageTag"]
sh "docker rmi -f \$(docker images -q ${imageTag})"
}
}
}
......@@ -90,12 +90,12 @@ def call(body) {
/* 4 */
stage('Clean'){
_utils.beautyEcho("Clear Cache Tmp", "stage")
_stage.clean_images(imageTagInfos,contextDir)
_stage.clean_images(imageTagInfos[0]["imageTag"],contextDir)
}
} catch (err) {
_utils.beautyEcho(err, "fail")
_stage.clean_images(imageTagInfos,contextDir)
_stage.clean_images(imageTagInfos[0]["imageTag"],contextDir)
throw err
}
}
......
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