mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-02 13:01:23 +01:00
Skip transfer blob for foreign layers
Signed-off-by: He Weiwei <hweiwei@vmware.com>
This commit is contained in:
parent
4dc983d419
commit
053a18a490
@ -272,6 +272,12 @@ func (t *Transfer) transferLayers(tag string, blobs []distribution.Descriptor) e
|
|||||||
}
|
}
|
||||||
|
|
||||||
digest := blob.Digest.String()
|
digest := blob.Digest.String()
|
||||||
|
|
||||||
|
if blob.MediaType == schema2.MediaTypeForeignLayer {
|
||||||
|
t.logger.Infof("blob %s of %s:%s is an foreign layer, skip", digest, repository, tag)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
exist, err := t.dstRegistry.BlobExist(digest)
|
exist, err := t.dstRegistry.BlobExist(digest)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.logger.Errorf("an error occurred while checking existence of blob %s of %s:%s on destination registry: %v",
|
t.logger.Errorf("an error occurred while checking existence of blob %s of %s:%s on destination registry: %v",
|
||||||
|
Loading…
Reference in New Issue
Block a user