mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 04:17:55 +08:00
fix: add support for uploaded index when signing using notation (#1882)
ci(notation): update to latest notation version fix(sync): add layers info when syncing signatures Signed-off-by: Andreea-Lupu <andreealupu1470@yahoo.com>
This commit is contained in:
@@ -80,6 +80,10 @@ func ParseRepo(repo string, metaDB mTypes.MetaDB, storeController storage.StoreC
|
||||
for _, descriptor := range indexContent.Manifests {
|
||||
tag := descriptor.Annotations[ispec.AnnotationRefName]
|
||||
|
||||
if zcommon.IsReferrersTag(tag) {
|
||||
continue
|
||||
}
|
||||
|
||||
descriptorBlob, err := getCachedBlob(repo, descriptor, metaDB, imageStore, log)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msg("load-repo: error checking manifestMeta in MetaDB")
|
||||
@@ -299,6 +303,11 @@ func getNotationSignatureLayersInfo(
|
||||
return layers, err
|
||||
}
|
||||
|
||||
// skip if is a notation index
|
||||
if manifestContent.MediaType == ispec.MediaTypeImageIndex {
|
||||
return []mTypes.LayerInfo{}, nil
|
||||
}
|
||||
|
||||
if len(manifestContent.Layers) != 1 {
|
||||
log.Error().Err(zerr.ErrBadManifest).Str("repository", repo).Str("reference", manifestDigest).
|
||||
Msg("load-repo: notation signature manifest requires exactly one layer but it does not")
|
||||
|
||||
Reference in New Issue
Block a user