forked from toolshed/abra
WIP: abra recipe upgrade on the way
This commit is contained in:
@ -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
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user