feat: implement builder plugin

This plugin will allow users to override the builder used for their application, enabling users to use custom builders if desired.
This commit is contained in:
Jose Diaz-Gonzalez
2021-02-28 17:25:03 -05:00
parent 1ec71cd509
commit 8c34cfe64e
21 changed files with 566 additions and 28 deletions

View File

@@ -0,0 +1,29 @@
package builder
import (
"github.com/dokku/dokku/plugins/common"
)
// CommandReport displays a network report for one or more apps
func CommandReport(appName string, format string, infoFlag string) error {
if len(appName) == 0 {
apps, err := common.DokkuApps()
if err != nil {
return err
}
for _, appName := range apps {
if err := ReportSingleApp(appName, format, infoFlag); err != nil {
return err
}
}
return nil
}
return ReportSingleApp(appName, format, infoFlag)
}
// CommandSet set or clear a builder property for an app
func CommandSet(appName string, property string, value string) error {
common.CommandPropertySet("builder", appName, property, value, DefaultProperties, GlobalProperties)
return nil
}