forked from coop-cloud/abra
fix: less fussy catalogue generation
This commit is contained in:
parent
d1526fad21
commit
759a00eeb3
|
@ -178,7 +178,7 @@ A new catalogue copy can be published to the recipes repository by passing the
|
|||
|
||||
features, category, err := catalogue.GetRecipeFeaturesAndCategory(recipeMeta.Name)
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
logrus.Warn(err)
|
||||
}
|
||||
|
||||
catl[recipeMeta.Name] = catalogue.RecipeMeta{
|
||||
|
|
|
@ -411,7 +411,7 @@ func GetImageMetadata(imageRowString string) (image, error) {
|
|||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
img.Image = imageName
|
||||
img.Image = strings.ReplaceAll(imageName, "`", "")
|
||||
|
||||
imageURL, err := GetStringInBetween(imgString, "(", ")")
|
||||
if err != nil {
|
||||
|
@ -441,7 +441,7 @@ func GetRecipeFeaturesAndCategory(recipeName string) (features, string, error) {
|
|||
"<!-- metadata -->", "<!-- endmetadata -->",
|
||||
)
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
return feat, category, err
|
||||
}
|
||||
|
||||
readmeLines := strings.Split( // Array item from lines
|
||||
|
@ -553,9 +553,22 @@ func GetRecipeVersions(recipeName string) (RecipeVersions, error) {
|
|||
path = strings.Split(path, "/")[1]
|
||||
}
|
||||
|
||||
var tag string
|
||||
switch img.(type) {
|
||||
case reference.NamedTagged:
|
||||
tag = img.(reference.NamedTagged).Tag()
|
||||
case reference.Named:
|
||||
logrus.Warnf("%s service is missing image tag?", path)
|
||||
continue
|
||||
}
|
||||
|
||||
logrus.Debugf("looking up image: '%s' from '%s'", img, path)
|
||||
|
||||
digest, err := client.GetTagDigest(img)
|
||||
if err != nil {
|
||||
return err
|
||||
// return err
|
||||
logrus.Warn(err)
|
||||
continue
|
||||
}
|
||||
|
||||
versionMeta[service.Name] = ServiceMeta{
|
||||
|
|
Loading…
Reference in New Issue