Documentation ¶
Index ¶
Constants ¶
const ( // ReasonRunning indicates that the reason for the inprogress status is that the TaskRun // is just starting to be reconciled ReasonRunning = "Running" // ReasonFailed indicates that the reason for the failure status is that one of the TaskRuns failed ReasonFailed = "Failed" // ReasonSucceeded indicates that the reason for the finished status is that all of the TaskRuns // completed successfully ReasonSucceeded = "Succeeded" )
Variables ¶
This section is empty.
Functions ¶
func GetPipelineConditionStatus ¶
func GetPipelineConditionStatus(prName string, state []*PipelineRunTaskRun, logger *zap.SugaredLogger) *duckv1alpha1.Condition
GetPipelineConditionStatus will return the Condition that the PipelineRun prName should be updated with, based on the status of the TaskRuns in state.
Types ¶
type GetTaskRun ¶
GetTaskRun is a function that will retrieve the TaskRun name from namespace.
type PipelineRunTaskRun ¶
type PipelineRunTaskRun struct { Task *v1alpha1.Task PipelineTask *v1alpha1.PipelineTask TaskRunName string TaskRun *v1alpha1.TaskRun }
PipelineRunTaskRun contains a Task and its associated TaskRun, if it exists. TaskRun can be nil to represent there being no TaskRun.
func GetNextTask ¶
func GetNextTask(prName string, state []*PipelineRunTaskRun, logger *zap.SugaredLogger) *PipelineRunTaskRun
GetNextTask returns the next Task for which a TaskRun should be created, or nil if no TaskRun should be created.
func GetPipelineState ¶
func GetPipelineState(getTask GetTask, getTaskRun GetTaskRun, p *v1alpha1.Pipeline, pipelineRunName string) ([]*PipelineRunTaskRun, error)
GetPipelineState retrieves all Tasks instances which the pipeline p references, getting instances from getTask. It will also check if there is a corresponding TaskRun for the Task using getTaskRun (the name is built from pipelineRunName). If it is unable to retrieve an instance of a referenced Task, it will return an error, otherwise it returns a list of all of the Tasks retrieved, and their TaskRuns if applicable.