[Agent][Deploy] - cqejpt

This commit is contained in:
zeaslity
2024-08-27 14:17:39 +08:00
parent ebed0bfc07
commit ae11512f0a
4 changed files with 117 additions and 5 deletions

View File

@@ -59,12 +59,18 @@ type UploadEntity struct {
ShouldUploadToDemoMinio bool // 上传镜像 DCU中的U
}
type DirectPushResultEntity struct {
ErrorPushedImageList []string
}
type ImageSyncResult struct {
ProcedureSuccessImageList []string // 经过特定步骤之后成功的镜像
DownloadResult *DownloadResultEntity
CompressResult *CompressResultEntity
UploadResult *UploadResultEntity
DirectPushResult *DirectPushResultEntity
}
type DownloadResultEntity struct {
@@ -103,6 +109,9 @@ func (syncCondition *ImageSyncEntity) PullFromEntityAndSyncConditionally() (imag
ErrorUploadImageList: nil,
AllDownloadUrl: nil,
},
DirectPushResult: &DirectPushResultEntity{
ErrorPushedImageList: nil,
},
}
if (syncCondition.DownloadCondition.CmiiNameTagList == nil && syncCondition.DownloadCondition.FullNameImageList == nil) || (len(syncCondition.DownloadCondition.CmiiNameTagList) == 0 && len(syncCondition.DownloadCondition.FullNameImageList) == 0) {
@@ -137,7 +146,7 @@ func (syncCondition *ImageSyncEntity) PullFromEntityAndSyncConditionally() (imag
log.ErrorF("DirectHarborHost is null ! can't push to target harbor !")
}
// push to
//errorPushImageNameList = image.TagFromListAndPushToCHarbor(allCmiiImageNameList, syncCondition.DirectHarborHost)
imageSyncResult.DirectPushResult.ErrorPushedImageList = image.TagFromListAndPushToCHarbor(imageSyncResult.ProcedureSuccessImageList, syncCondition.DirectHarborHost)
}
// build result