fix gc remove manifest issue (#12748)

fixes #12720

The GC job doesn't remove the manifest of scheme1.MediaTypeSignedManifest as it's recognized by GC job.

Signed-off-by: wang yan <wangyan@vmware.com>
This commit is contained in:
Wang Yan 2020-08-13 11:25:06 +08:00 committed by GitHub
parent e476286fdc
commit 01e4aa61f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -88,8 +88,10 @@ func (b *Blob) IsForeignLayer() bool {
// IsManifest returns true if the blob is manifest layer
func (b *Blob) IsManifest() bool {
return b.ContentType == schema2.MediaTypeManifest || b.ContentType == schema1.MediaTypeManifest ||
b.ContentType == v1.MediaTypeImageManifest || b.ContentType == v1.MediaTypeImageIndex || b.ContentType == manifestlist.MediaTypeManifestList
return b.ContentType == schema2.MediaTypeManifest ||
b.ContentType == schema1.MediaTypeManifest || b.ContentType == schema1.MediaTypeSignedManifest ||
b.ContentType == v1.MediaTypeImageManifest || b.ContentType == v1.MediaTypeImageIndex ||
b.ContentType == manifestlist.MediaTypeManifestList
}
// ProjectBlob alias ProjectBlob model