Files
airshipctl/cmd/workflow/workflow.go
Ian Howell cbd1e048c9 Move the client objects out of the settings objects
* This also modifies the way that logging is handled
2019-06-06 10:57:33 -05:00

31 lines
861 B
Go

package workflow
import (
"github.com/spf13/cobra"
"github.com/ian-howell/airshipctl/pkg/environment"
wfenv "github.com/ian-howell/airshipctl/pkg/workflow/environment"
)
// PluginSettingsID is used as a key in the root settings map of plugin settings
const PluginSettingsID = "argo"
// NewWorkflowCommand creates a new command for working with argo workflows
func NewWorkflowCommand(rootSettings *environment.AirshipCTLSettings) *cobra.Command {
workflowRootCmd := &cobra.Command{
Use: "workflow",
Short: "Access to argo workflows",
Aliases: []string{"workflows", "wf"},
}
wfSettings := &wfenv.Settings{
AirshipCTLSettings: rootSettings,
}
wfSettings.InitFlags(workflowRootCmd)
workflowRootCmd.AddCommand(NewWorkflowInitCommand(wfSettings))
workflowRootCmd.AddCommand(NewWorkflowListCommand(wfSettings))
return workflowRootCmd
}