feat: implement more of the registry plugin

This commit is contained in:
Jose Diaz-Gonzalez
2021-03-19 16:50:32 -04:00
parent 3848b467a2
commit 88cbae2a6d
4 changed files with 49 additions and 11 deletions

View File

@@ -6,9 +6,31 @@ import (
"github.com/dokku/dokku/plugins/common"
)
// TriggerDeployedAppImageRepo outputs the associated image repo to stdout
func TriggerDeployedAppImageRepo(appName string) error {
imageRepo := common.PropertyGet("registry", appName, "image-repo")
if imageRepo == "" {
imageRepo = common.GetAppImageRepo(appName)
}
fmt.Println(imageRepo)
return nil
}
// TriggerDeployedAppImageTag outputs the associated image tag to stdout
func TriggerDeployedAppImageTag(appName string) error {
tagVersion := common.PropertyGet("registry", appName, "tag-version")
if tagVersion == "" {
tagVersion = "1"
}
fmt.Println(tagVersion)
return nil
}
// TriggerDeployedAppRepository outputs the associated registry repository to stdout
func TriggerDeployedAppRepository(appName string) error {
// TODO
fmt.Println(getRegistryServerForApp(appName))
return nil
}