forked from jenkins-x-plugins/jx-gitops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
helmfile.go
35 lines (33 loc) · 1.28 KB
/
helmfile.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package helmfile
import (
"github.com/jenkins-x/jx-gitops/pkg/cmd/helmfile/add"
"github.com/jenkins-x/jx-gitops/pkg/cmd/helmfile/move"
"github.com/jenkins-x/jx-gitops/pkg/cmd/helmfile/report"
"github.com/jenkins-x/jx-gitops/pkg/cmd/helmfile/resolve"
"github.com/jenkins-x/jx-gitops/pkg/cmd/helmfile/structure"
"github.com/jenkins-x/jx-gitops/pkg/cmd/helmfile/validate"
"github.com/jenkins-x/jx-helpers/v3/pkg/cobras"
"github.com/jenkins-x/jx-logging/v3/pkg/log"
"github.com/spf13/cobra"
)
// NewCmdHelmfile creates the new command
func NewCmdHelmfile() *cobra.Command {
command := &cobra.Command{
Use: "helmfile",
Short: "Commands for working with helmfile",
Aliases: []string{"helmfiles"},
Run: func(command *cobra.Command, args []string) {
err := command.Help()
if err != nil {
log.Logger().Errorf(err.Error())
}
},
}
command.AddCommand(cobras.SplitCommand(add.NewCmdHelmfileAdd()))
command.AddCommand(cobras.SplitCommand(move.NewCmdHelmfileMove()))
command.AddCommand(cobras.SplitCommand(report.NewCmdHelmfileReport()))
command.AddCommand(cobras.SplitCommand(resolve.NewCmdHelmfileResolve()))
command.AddCommand(cobras.SplitCommand(validate.NewCmdHelmfileValidate()))
command.AddCommand(cobras.SplitCommand(structure.NewCmdHelmfileStructure()))
return command
}