[Agent][Deploy] - update

This commit is contained in:
zeaslity
2024-06-04 16:53:37 +08:00
parent 019a011b55
commit 9b6520d3f2
7 changed files with 93 additions and 59 deletions

View File

@@ -247,24 +247,24 @@ func TagFromListAndPushToCHarbor(referenceImageList []string, targetHarborHost s
}
targetImageName := targetHarborHost + ":8033/" + targetProject + "/" + imageName
fmt.Println(cmiiImageFullName)
fmt.Println(targetImageName)
//fmt.Println(cmiiImageFullName)
//fmt.Println(targetImageName)
//if TagFromSourceToTarget(cmiiImageFullName, targetImageName) {
// pushResult := UploadToOctopusKindHarbor(targetImageName)
// if pushResult == nil {
// errorPushImageNameList = append(errorPushImageNameList, cmiiImageFullName)
// log.InfoF("[ImageTagFromListAndPushToCHarbor] - push of %s error error !", targetImageName)
// break
// }
// scanner := bufio.NewScanner(pushResult)
// for scanner.Scan() {
//
// }
// log.InfoF("[ImageTagFromListAndPushToCHarbor] - push of %s success!", targetImageName)
//} else {
// errorPushImageNameList = append(errorPushImageNameList, cmiiImageFullName)
//}
if TagFromSourceToTarget(cmiiImageFullName, targetImageName) {
pushResult := UploadToOctopusKindHarbor(targetImageName)
if pushResult == nil {
errorPushImageNameList = append(errorPushImageNameList, cmiiImageFullName)
log.InfoF("[ImageTagFromListAndPushToCHarbor] - push of %s error error !", targetImageName)
break
}
scanner := bufio.NewScanner(pushResult)
for scanner.Scan() {
}
log.InfoF("[ImageTagFromListAndPushToCHarbor] - push of %s success!", targetImageName)
} else {
errorPushImageNameList = append(errorPushImageNameList, cmiiImageFullName)
}
}