woodpecker-helm3/cmd/drone-helm/main.go
Erin Call 08ddf5e27a
Log debug output in helm.Config [#9]
Redacting KubeToken may not be sufficient, since it's possible that
someone would put secrets in Values or StringValues. Unilaterally
redacting those seems unhelpful, though, since they may be the very
thing the user is trying to debug. I've settled on redacting the obvious
field without trying to promise that all sensitive data will be hidden.
2019-12-24 11:08:09 -08:00

35 lines
535 B
Go

package main
import (
"fmt"
"os"
"github.com/pelotech/drone-helm3/internal/helm"
)
func main() {
cfg, err := helm.NewConfig(os.Stdout, os.Stderr)
if err != nil {
fmt.Fprintf(os.Stderr, "%s\n", err.Error())
return
}
// Make the plan
plan, err := helm.NewPlan(*cfg)
if err != nil {
fmt.Fprintf(os.Stderr, "%w\n", err)
os.Exit(1)
}
// Execute the plan
err = plan.Execute()
// Expect the plan to go off the rails
if err != nil {
fmt.Fprintf(os.Stderr, err.Error())
// Throw away the plan
os.Exit(1)
}
}