refactor: use framework for running function against all apps

This commit is contained in:
Jose Diaz-Gonzalez
2020-11-21 23:55:03 -05:00
parent 1d93246af8
commit 7cdc68a007
6 changed files with 47 additions and 25 deletions

17
plugins/logs/logs.go Normal file
View File

@@ -0,0 +1,17 @@
package logs
import (
"fmt"
"github.com/dokku/dokku/plugins/common"
)
// GetFailedLogs outputs failed deploy logs for a given app
func GetFailedLogs(appName string) error {
common.LogInfo2Quiet(fmt.Sprintf("%s failed deploy logs", appName))
s := common.GetAppScheduler(appName)
if err := common.PlugnTrigger("scheduler-logs-failed", s, appName); err != nil {
return err
}
return nil
}