feat: port scheduler-docker-local :report subcommand to golang

The bash :report implementation for the scheduler-docker-local plugin is replaced with a compiled golang binary. The plugin already shipped golang code, so the report subcommand is added alongside its existing triggers binary, and the init-process and parallel-schedule-count helpers remain in bash for the deploy pipeline.
This commit is contained in:
Jose Diaz-Gonzalez
2026-07-07 07:06:24 -04:00
parent 3fee5b881a
commit fe11d508d3
9 changed files with 175 additions and 106 deletions

View File

@@ -0,0 +1,29 @@
package schedulerdockerlocal
import (
"errors"
"github.com/dokku/dokku/plugins/common"
)
// CommandReport displays a scheduler-docker-local 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 {
if errors.Is(err, common.NoAppsExist) {
common.LogWarn(err.Error())
return nil
}
return err
}
for _, appName := range apps {
if err := ReportSingleApp(appName, format, infoFlag); err != nil {
return err
}
}
return nil
}
return ReportSingleApp(appName, format, infoFlag)
}