fix: promote registry image-repo-template to app + global
The registry plugin accepted `registry:set <app> image-repo-template <value>` and persisted the per-app file, but only ever read the global value when rendering the image repository, so per-app overrides were silently dropped. The property now follows the same per-app to global to default fallback chain used by `push-on-release` and `server`, and `registry:report` exposes the raw per-app value alongside the existing global and computed flags. The `push-extra-tags` report flags were extended for the same reason: the runtime already honored per-app and global values, but the report only surfaced the raw per-app entry.
This commit is contained in:
@@ -63,7 +63,10 @@ func GetDockerConfigArgs(appName string) []string {
|
||||
}
|
||||
|
||||
func getImageRepoFromTemplate(appName string) (string, error) {
|
||||
imageRepoTemplate := common.PropertyGet("registry", "--global", "image-repo-template")
|
||||
imageRepoTemplate := strings.TrimSpace(reportImageRepoTemplate(appName))
|
||||
if imageRepoTemplate == "" {
|
||||
imageRepoTemplate = reportGlobalImageRepoTemplate(appName)
|
||||
}
|
||||
if imageRepoTemplate == "" {
|
||||
return "", nil
|
||||
}
|
||||
@@ -131,11 +134,7 @@ func incrementTagVersion(appName string) (int, error) {
|
||||
}
|
||||
|
||||
func getRegistryPushExtraTagsForApp(appName string) string {
|
||||
value := common.PropertyGet("registry", appName, "push-extra-tags")
|
||||
if value == "" {
|
||||
value = common.PropertyGet("registry", "--global", "push-extra-tags")
|
||||
}
|
||||
return value
|
||||
return reportComputedPushExtraTags(appName)
|
||||
}
|
||||
|
||||
func pushToRegistry(appName string, tag int, imageID string, imageRepo string) error {
|
||||
|
||||
Reference in New Issue
Block a user