diff --git a/pkg/version_config_manager/version_config_manager.go b/pkg/version_config_manager/version_config_manager.go index 47c7ccf85dd76..16b8698d266d9 100644 --- a/pkg/version_config_manager/version_config_manager.go +++ b/pkg/version_config_manager/version_config_manager.go @@ -13,6 +13,8 @@ type VersionConfig struct { ResourceName string `json:"resourceName"` } +var DefaultVersionSource = "Chart.yaml" + func (v *VersionConfigManager) GetVersionConfig(app *metav1.ObjectMeta) (*VersionConfig, error) { var appConfig *codefresh.PromotionTemplate @@ -58,7 +60,7 @@ func (v *VersionConfigManager) GetVersionConfig(app *metav1.ObjectMeta) (*Versio log.Infof("Used default CfAppConfig for: '%s'", cache.CfAppConfigCacheKey(app.Namespace, app.Name)) return &VersionConfig{ JsonPath: "$.appVersion", - ResourceName: "Chart.yaml", + ResourceName: DefaultVersionSource, }, nil } diff --git a/reposerver/repository/repository.go b/reposerver/repository/repository.go index 5415f9b90d1ac..62b95137c439c 100644 --- a/reposerver/repository/repository.go +++ b/reposerver/repository/repository.go @@ -1599,7 +1599,8 @@ func GenerateManifests(ctx context.Context, appPath, repoRoot, revision string, appVersions, err := getAppVersions(appPath, versionConfig) if err != nil { errorMessage := fmt.Sprintf("failed to retrieve application version, app name: %q: %s", q.AppName, err.Error()) - if versionConfig.ResourceName == "Chart.yaml" { + if (versionConfig.ResourceName == version_config_manager.DefaultVersionSource) && + (err.Error() == "unknown key appVersion") { log.Info(errorMessage) } else { log.Error(errorMessage)