-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathstackpack.go
More file actions
38 lines (32 loc) · 1.13 KB
/
stackpack.go
File metadata and controls
38 lines (32 loc) · 1.13 KB
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
36
37
38
package cmd
import (
"os"
"github.com/spf13/cobra"
"github.com/stackvista/stackstate-cli/cmd/stackpack"
"github.com/stackvista/stackstate-cli/internal/di"
)
const (
experimentalStackpackEnvVar = "STS_EXPERIMENTAL_STACKPACK"
)
func StackPackCommand(cli *di.Deps) *cobra.Command {
cmd := &cobra.Command{
Use: "stackpack",
Short: "Manage stackpacks",
Long: "Manage and upload StackPacks.",
}
cmd.AddCommand(stackpack.StackpackUploadCommand(cli))
cmd.AddCommand(stackpack.StackpackListCommand(cli))
cmd.AddCommand(stackpack.StackpackListInstanceCommand(cli))
cmd.AddCommand(stackpack.StackpackInstallCommand(cli))
cmd.AddCommand(stackpack.StackpackListParameterCommand(cli))
cmd.AddCommand(stackpack.StackpackUninstallCommand(cli))
cmd.AddCommand(stackpack.StackpackUpgradeCommand(cli))
cmd.AddCommand(stackpack.StackpackConfirmManualStepsCommand(cli))
cmd.AddCommand(stackpack.StackpackDescribeCommand(cli))
// The not-production-ready commands
if os.Getenv(experimentalStackpackEnvVar) != "" {
cmd.AddCommand(stackpack.StackpackScaffoldCommand(cli))
cmd.AddCommand(stackpack.StackpackPackageCommand(cli))
}
return cmd
}