Simple implementation of the tillerless mode (#531)

Ref #449
This commit is contained in:
Patrick Valsecchi
2019-04-05 19:02:37 +09:00
committed by KUOKA Yusuke
parent 72c43a2f46
commit 1acd07fa7e
13 changed files with 312 additions and 118 deletions
+1 -1
View File
@@ -88,7 +88,7 @@ func (bus *Bus) Trigger(evt string, context map[string]interface{}) (bool, error
}
}
bytes, err := bus.Runner.Execute(command, args)
bytes, err := bus.Runner.Execute(command, args, map[string]string{})
bus.Logger.Debugf("hook[%s]: %s\n", name, string(bytes))
if err != nil {
+1 -1
View File
@@ -13,7 +13,7 @@ var logger = helmexec.NewLogger(os.Stdout, "warn")
type runner struct {
}
func (r *runner) Execute(cmd string, args []string) ([]byte, error) {
func (r *runner) Execute(cmd string, args []string, env map[string]string) ([]byte, error) {
if cmd == "ng" {
return nil, fmt.Errorf("cmd failed due to invalid cmd: %s", cmd)
}