Actual drone-invokable helm commands

This commit is contained in:
Erin Call
2019-12-05 14:35:25 -08:00
parent e77f6842b9
commit 238ede6f9e
11 changed files with 130 additions and 53 deletions

View File

@@ -7,6 +7,8 @@ import (
"syscall"
)
const HELM_BIN = "/usr/bin/helm"
// The cmd interface provides a generic form of exec.Cmd so that it can be mocked out in tests.
type cmd interface {
// methods that exist on exec.Cmd
@@ -41,8 +43,10 @@ type execCmd struct {
*exec.Cmd
}
var Command = func() cmd {
return &execCmd{}
var Command = func(path string, args ...string) cmd {
return &execCmd{
Cmd: exec.Command(path, args...),
}
}
func (c *execCmd) Path(p string) { c.Cmd.Path = p }