[ Cmii ] [ Octopus ] - image sync refresh

This commit is contained in:
zeaslity
2024-03-19 10:11:00 +08:00
parent df44d6eef9
commit 798aea36fc
3 changed files with 13 additions and 8 deletions

View File

@@ -44,7 +44,7 @@ func (sync ImageSyncEntity) PullFromEntityAndSyncConditionally() (imageSyncResul
// get all image name by Name or Version
// pull images
// compress
if sync.ProjectVersion == "" {
if sync.ProjectVersion != "" {
// get version
if sync.DirectHarborHost == "" {
errorPullImageList, errorGzipImageList, allCmiiImageNameList = FetchVersionImages(sync.ProjectVersion, true)
@@ -62,8 +62,9 @@ func (sync ImageSyncEntity) PullFromEntityAndSyncConditionally() (imageSyncResul
}
}
realCmiiImageList = append(realCmiiImageList, remove(allCmiiImageNameList, errorPullImageList)...)
realCmiiImageList = append(realCmiiImageList, remove(allCmiiImageNameList, errorGzipImageList)...)
// todo function error
realCmiiImageList = remove(allCmiiImageNameList, errorPullImageList)
realCmiiImageList = remove(allCmiiImageNameList, errorGzipImageList)
// direct push if can
if sync.DirectHarborHost != "" {