policy: fixes for image source handling
- Make sure tag is added to image reference as containerd reference parser refuses to parse otherwise. - When attestation is asked from non-index, return nil instead of error. This is for consistency as likely to fail in BuildKit before that is fixed separately. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
@@ -388,6 +388,7 @@ func parseSource(input string) (*pb.SourceOp, error) {
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "failed to parse image source reference")
|
||||
}
|
||||
ref = reference.TagNameOnly(ref)
|
||||
return &pb.SourceOp{Identifier: "docker-image://" + ref.String()}, nil
|
||||
}
|
||||
if strings.HasPrefix(input, "git://") {
|
||||
|
||||
Reference in New Issue
Block a user