WIP: abra recipe upgrade on the way

This commit is contained in:
2021-08-06 15:40:23 +02:00
parent c75c2254e4
commit 11ef64ead3
3 changed files with 69 additions and 1 deletions

View File

@ -158,7 +158,32 @@ var recipeUpgradeCommand = &cli.Command{
if recipe == "" {
internal.ShowSubcommandHelpAndError(c, errors.New("no recipe provided"))
}
// TODO: part 1 of https://git.coopcloud.tech/coop-cloud/go-abra/issues/39#issuecomment-8066
type existingTags struct {
AppCatalogueTags map[string]string
RegistryTags map[string]string
RecipeSkipTags map[string]string
}
pattern := fmt.Sprintf("%s/%s/compose**yml", config.APPS_DIR, recipe)
composeFiles, err := filepath.Glob(pattern)
if err != nil {
logrus.Fatal(err)
}
opts := options.Deploy{Composefiles: composeFiles}
compose, err := loader.LoadComposefile(opts)
if err != nil {
logrus.Fatal(err)
}
for _, service := range compose.Services {
_, err := catalogue.VersionsOfService(recipe, service.Name)
if err != nil {
logrus.Fatal(err)
}
}
// TODO
return nil
},
}