// RunPodStep Run a pod-based step
RunPodStep Run a pod-based step
// RunPodStep Run a pod - based step
func RunPodStep(c coordinator.Coordinator, sc *context.StepContext, l Listener) error {
	step := sc.Step
	stepName := step.StepName(sc.Change.StepSelector)
	var command []string
	if !step.Cached() && len(step.State.GeneratedScript) > 0 {
		fmt.Println("Running step " + stepName + ":")
		command = []string{"/bin/sh", "/" + step.State.GeneratedScript}
	}
	step.SetVolumes(normalizeVolumePaths(sc.WorkflowContext.Workflow.Spec.State.ProjectRoot, step.Volumes()))
	completionListener := &podCompletionListener{
		listener:    l,
		stepContext: sc,
	}
	environment := v1.CollectVariables(step.Environment())
	environment.ResolveFrom(sc.WorkflowContext.Workflow.Spec.State.Variables)
	if len(step.Name()) < 1 {
		stepName = "Step " + stepName
	}
	var ports []v1.Port
	var health *v1.HealthCheck
	var readiness *v1.HealthCheck
	if step.Service != nil {
		ports = step.Service.Ports
		health = step.Service.Health
		readiness = step.Service.Readiness
	}
	err := c.RunStep(
		sc.WorkflowContext.Context,
		&coordinator.RunStepSpec{
			Command:          command,
			Cleanup:          sc.WorkflowContext.Cleanup,
			Environment:      environment,
			Health:           health,
			Image:            step.State.GeneratedImage,
			Name:             stepName,
			PodListener:      completionListener,
			Ports:            ports,
			Readiness:        readiness,
			VariableReceiver: completionListener.addVariable,
			Volumes:          step.Volumes(),
			WorkflowReceiver: completionListener.addGeneratedWorkflow,
		})
	return err
}
func RunPodStep ( c coordinator . Coordinator , sc * context . StepContext , l Listener ) error { step := sc . Step stepName := step . StepName ( sc . Change . StepSelector ) var command [ ] string if ! step . Cached ( ) && len ( step . State . GeneratedScript ) > 0 { fmt . Println ( " " + stepName + " " ) command = [ ] string { " " , " " + step . State . GeneratedScript } } step . SetVolumes ( normalizeVolumePaths ( sc . WorkflowContext . Workflow . Spec . State . ProjectRoot , step . Volumes ( ) ) ) completionListener := & podCompletionListener { listener : l , stepContext : sc , } environment := v1 . CollectVariables ( step . Environment ( ) ) environment . ResolveFrom ( sc . WorkflowContext . Workflow . Spec . State . Variables ) if len ( step . Name ( ) ) < 1 { stepName = " " + stepName } var ports [ ] v1 . Port var health * v1 . HealthCheck var readiness * v1 . HealthCheck if step . Service != nil { ports = step . Service . Ports health = step . Service . Health readiness = step . Service . Readiness } err := c . RunStep ( sc . WorkflowContext . Context , & coordinator . RunStepSpec { Command : command , Cleanup : sc . WorkflowContext . Cleanup , Environment : environment , Health : health , Image : step . State . GeneratedImage , Name : stepName , PodListener : completionListener , Ports : ports , Readiness : readiness , VariableReceiver : completionListener . addVariable , Volumes : step . Volumes ( ) , WorkflowReceiver : completionListener . addGeneratedWorkflow , } ) return err }
RunPodStep Run a pod-based step
RunPodStep Run a pod - based step