Documentation ¶
Index ¶
- Variables
- func CreateTrees(wfVersion *types.WorkflowVersionDetailed, includePrimitiveNodes bool) (map[string]*types.TreeNode, []*types.TreeNode)
- func FormatMachines(machines types.Machines, inline bool) string
- func GetAvailableMachines(fleetName string) types.Machines
- func GetLatestWorkflowVersion(workflowID uuid.UUID, fleetID uuid.UUID) *types.WorkflowVersionDetailed
- func GetRunByID(id uuid.UUID) *types.Run
- func GetSubJobs(runID uuid.UUID) []types.SubJob
- func PrintTrees(roots []*types.TreeNode, allNodes *map[string]*types.TreeNode, ...) string
- func WatchRun(runID uuid.UUID, downloadPath string, ...)
Constants ¶
This section is empty.
Variables ¶
View Source
var ExecuteCmd = &cobra.Command{ Use: "execute", Short: "Execute a workflow", Long: ``, Run: func(cmd *cobra.Command, args []string) { if util.SpaceName == "" { util.SpaceName = "Playground" } path := util.FormatPath() if path == "" { if len(args) == 0 { fmt.Println("Workflow name or path must be specified!") return } path = strings.Trim(args[0], "/") } else { if len(args) > 0 { fmt.Println("Please use either path or flag syntax for the platform objects.") return } } fleet = util.GetFleetInfo(fleetName) if fleet == nil { return } var version *types.WorkflowVersionDetailed if workflowYAML != "" { version = readWorkflowYAMLandCreateVersion(workflowYAML, newWorkflowName, path) } else { version = prepareForExec(path) } if version == nil { fmt.Println("Couldn't find or create the workflow version!") os.Exit(0) } allNodes, roots = CreateTrees(version, false) if executionMachines == (types.Machines{}) { if maxMachines { executionMachines = version.MaxMachines } else if machineConfiguration != "" { machines, err := parseMachineConfiguration(machineConfiguration) if err != nil { fmt.Printf("Error: %s\n", err) os.Exit(1) } if len(fleet.Machines) == 3 { executionMachines = machines if machines.Default != nil { fmt.Printf("Error: you need to use the small-medium-large format to specify the numbers of machines (e.g. 1-2-3)") os.Exit(1) } } else { executionMachines, err = handleSingleMachineType(*fleet, machines) if err != nil { fmt.Printf("Error: %s\n", err) os.Exit(1) } } } else { executionMachines = setMachinesToMinimum(version.MaxMachines) } } outputNodes := make([]string, 0) if outputNodesFlag != "" { outputNodes = strings.Split(outputNodesFlag, ",") } if !maxMachinesTypeCompatible(executionMachines, version.MaxMachines) { fmt.Println("Workflow maximum machines types are not compatible with config machines!") fmt.Println("Workflow max machines: " + FormatMachines(version.MaxMachines, true)) fmt.Println("Config machines: " + FormatMachines(executionMachines, true)) os.Exit(0) } createRun(version.ID, fleet.ID, watch, outputNodes, outputsDirectory) }, }
ExecuteCmd represents the execute command
Functions ¶
func CreateTrees ¶
func GetAvailableMachines ¶
func PrintTrees ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.