test
This commit is contained in:
@@ -3,22 +3,25 @@ package helm
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"errors"
|
||||
"os/exec"
|
||||
"errors"
|
||||
|
||||
log "oc-deploy/log_wrapper"
|
||||
)
|
||||
|
||||
func (this RealHelmCommand) Status(name string) (string, error) {
|
||||
// type HelmData struct {
|
||||
// Name string
|
||||
// }
|
||||
|
||||
func (this HelmCommand) Status(data HelmChart) (string, error) {
|
||||
|
||||
helm_bin := this.Bin
|
||||
|
||||
msg := fmt.Sprintf("%s status %s --show-resources -o json", helm_bin, name)
|
||||
msg := fmt.Sprintf("%s status %s --show-resources -o json", helm_bin, data.Name)
|
||||
log.Log().Debug().Msg(msg)
|
||||
|
||||
cmd_args := strings.Split(msg, " ")
|
||||
|
||||
cmd := exec.Command(cmd_args[0], cmd_args[1:]...)
|
||||
cmd := this.Exec(cmd_args[0], cmd_args[1:]...)
|
||||
stdout, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
log.Log().Debug().Msg(string(stdout))
|
||||
@@ -27,4 +30,3 @@ func (this RealHelmCommand) Status(name string) (string, error) {
|
||||
|
||||
return string(stdout), nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user