feat: add ability to customize the registry repo with a template

This commit is contained in:
Jose Diaz-Gonzalez
2024-01-19 06:20:43 -05:00
parent ea28367689
commit 214dc9b69a
5 changed files with 67 additions and 15 deletions

View File

@@ -10,8 +10,15 @@ import (
// TriggerDeployedAppImageRepo outputs the associated image repo to stdout
func TriggerDeployedAppImageRepo(appName string) error {
imageRepo := common.PropertyGet("registry", appName, "image-repo")
imageRepo = strings.TrimSpace(imageRepo)
imageRepo := strings.TrimSpace(reportImageRepo(appName))
if imageRepo == "" {
var err error
imageRepo, err = getImageRepoFromTemplate(appName)
if err != nil {
return fmt.Errorf("Unable to determine image repo from template: %w", err)
}
}
if imageRepo == "" {
imageRepo = common.GetAppImageRepo(appName)
}