resources

package
v0.0.0-...-5a3499f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
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 GetTask

type GetTask func(namespace, name string) (*v1alpha1.Task, error)

GetTask is a function that will retrieve the Task name from namespace.

type GetTaskRun

type GetTaskRun func(namespace, name string) (*v1alpha1.TaskRun, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL