add image info to parameter

Signed-off-by: Laurentiu Niculae <themelopeus@gmail.com>
This commit is contained in:
Laurentiu Niculae
2022-07-19 16:16:15 +03:00
committed by Ramkumar Chinchani
parent 7e3d063319
commit 80369140f1
4 changed files with 44 additions and 264 deletions
+11 -4
View File
@@ -272,16 +272,23 @@ func globalSearch(repoList []string, name, tag string, olu common.OciLayoutUtils
matchesTag := strings.HasPrefix(manifest.Tag, tag)
if index != -1 {
imageConfigInfo, err := olu.GetImageConfigInfo(repo, godigest.Digest(tagsInfo[i].Digest))
if err != nil {
log.Error().Err(err).Msgf("can't retrieve config info for the image %s %s", repo, manifest.Tag)
continue
}
tag := manifest.Tag
size := strconv.Itoa(int(imageSize))
vendor := olu.GetImageVendor(repo, godigest.Digest(tagsInfo[i].Digest))
lastUpdated := olu.GetImageLastUpdated(repo, godigest.Digest(tagsInfo[i].Digest))
isSigned := manifest.IsSigned
// update matching score
score := calculateImageMatchingScore(repo, index, matchesTag)
os, arch := olu.GetImagePlatform(repo, godigest.Digest(tagsInfo[i].Digest))
vendor := olu.GetImageVendor(imageConfigInfo)
lastUpdated := olu.GetImageLastUpdated(imageConfigInfo)
os, arch := olu.GetImagePlatform(imageConfigInfo)
osArch := &gql_generated.OsArch{
Os: &os,
Arch: &arch,