// Run Run a workflow in the current project
Run Run a workflow in the current project
// Run Run a workflow in the current project
func Run(workflowName string, args []string) error {
	workflow, err := files.ReadWorkflow(workflowName)
	if err != nil {
		return err
	}
	addArgumentVariables(workflow, args)
	err = validation.Validate(&workflow.Spec)
	if err != nil {
		return err
	}
	c, err := controller.NewController()
	if err != nil {
		return err
	}
	context, cancel := context.WithCancel(context.Background())
	interruptChannel := make(chan os.Signal, 1)
	signal.Notify(interruptChannel, os.Interrupt)
	go func() {
		for _ = range interruptChannel {
			log.Debugf("An interrupt was requested, performing clean-up!")
			cancel()
		}
	}()
	c.Execute(context, workflow)
	return nil
}
func Run ( workflowName string , args [ ] string ) error { workflow , err := files . ReadWorkflow ( workflowName ) if err != nil { return err } addArgumentVariables ( workflow , args ) err = validation . Validate ( & workflow . Spec ) if err != nil { return err } c , err := controller . NewController ( ) if err != nil { return err } context , cancel := context . WithCancel ( context . Background ( ) ) interruptChannel := make ( chan os . Signal , 1 ) signal . Notify ( interruptChannel , os . Interrupt ) go func ( ) { for _ = range interruptChannel { log . Debugf ( " " ) cancel ( ) } } ( ) c . Execute ( context , workflow ) return nil }
Run Run a workflow in the current project
Run Run a workflow in the current project