feat: show live output from the Helm binary (#286)

* feat: show live output from the Helm binary

Signed-off-by: Rodrigo Fior Kuntzer <rodrigo@miro.com>

* fixup! Merge branch 'main' into enable-live-output

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
This commit is contained in:
Rodrigo Fior Kuntzer
2022-09-18 14:24:35 +09:00
committed by GitHub
parent c828d22a5c
commit 8408b021f0
22 changed files with 338 additions and 61 deletions
+1 -1
View File
@@ -118,7 +118,7 @@ func (bus *Bus) Trigger(evt string, evtErr error, context map[string]interface{}
}
}
bytes, err := bus.Runner.Execute(command, args, map[string]string{})
bytes, err := bus.Runner.Execute(command, args, map[string]string{}, false)
bus.Logger.Debugf("hook[%s]: %s\n", name, string(bytes))
if hook.ShowLogs {
prefix := fmt.Sprintf("\nhook[%s] logs | ", evt)
+1 -1
View File
@@ -19,7 +19,7 @@ func (r *runner) ExecuteStdIn(cmd string, args []string, env map[string]string,
return []byte(""), nil
}
func (r *runner) Execute(cmd string, args []string, env map[string]string) ([]byte, error) {
func (r *runner) Execute(cmd string, args []string, env map[string]string, enableLiveOutput bool) ([]byte, error) {
if cmd == "ng" {
return nil, fmt.Errorf("cmd failed due to invalid cmd: %s", cmd)
}