Documentation ¶
Overview ¶
Package tekton contains useful functionality for tekton resource.
Index ¶
- Constants
- func CheckWorkspaceBindings(ctx context.Context, pr *v1beta1.PipelineRun) error
- func ConvertParamBeta1ToV1(param pipelinev1beta1.Param) pipelinev1.Param
- func ConvertParamV1ToBeta1(param pipelinev1.Param) pipelinev1beta1.Param
- func ConvertParamsBeta1ToV1(params []pipelinev1beta1.Param) []pipelinev1.Param
- func ConvertParamsV1ToBeta1(params []pipelinev1.Param) []pipelinev1beta1.Param
- func FilterCompletedTaskRun(list *v1beta1.TaskRunList)
- func GetPipelineRunOwner(taskrun v1beta1.TaskRun) (exist bool, owner metav1.OwnerReference)
- func GetPipelineSpec(pr *v1beta1.PipelineRun) *v1beta1.PipelineSpec
- func GetWorkspaceBindings(ctx context.Context, pr *v1beta1.PipelineRun) ([]v1beta1.WorkspaceBinding, error)
- func InjectPipelineRunMeta(pr *v1beta1.PipelineRun, meta PipelineRunMeta) error
- func IsCompletedTaskRun(taskRun v1beta1.TaskRun) bool
- func Replacements(ctx context.Context, paramSpecs []v1beta1.ParamSpec, params []v1beta1.Param) (stringReplacements map[string]string, arrayReplacements map[string][]string, ...)
- func SortTaskRunByCompletion(list *v1beta1.TaskRunList)
- func WithDefaultConfig(ctx context.Context, options ...ConfigOptions) context.Context
- type ConfigOptions
- type PipelineRunMeta
- type TaskRunListSortByCompletion
Constants ¶
const PodAnnotationMetaJson = metav1alpha1.PodAnnotationKeyPrefix + "meta.json"
PodAnnotationMetaJson for annotation injecting meta.json file to pipelinerun
Variables ¶
This section is empty.
Functions ¶
func CheckWorkspaceBindings ¶ added in v0.10.0
func CheckWorkspaceBindings(ctx context.Context, pr *v1beta1.PipelineRun) error
CheckWorkspaceBindings check if workspace bindings are valid
func ConvertParamBeta1ToV1 ¶ added in v0.11.0
func ConvertParamBeta1ToV1(param pipelinev1beta1.Param) pipelinev1.Param
ConvertParamBeta1ToV1 convert param from v1beta1 to v1
func ConvertParamV1ToBeta1 ¶ added in v0.11.0
func ConvertParamV1ToBeta1(param pipelinev1.Param) pipelinev1beta1.Param
ConvertParamV1ToBeta1 convert param from v1 to v1beta1
func ConvertParamsBeta1ToV1 ¶ added in v0.11.0
func ConvertParamsBeta1ToV1(params []pipelinev1beta1.Param) []pipelinev1.Param
ConvertParamsBeta1ToV1 convert params from v1beta1 to v1
func ConvertParamsV1ToBeta1 ¶ added in v0.11.0
func ConvertParamsV1ToBeta1(params []pipelinev1.Param) []pipelinev1beta1.Param
ConvertParamsV1ToBeta1 convert params from v1 to v1beta1
func FilterCompletedTaskRun ¶
func FilterCompletedTaskRun(list *v1beta1.TaskRunList)
FilterCompletedTaskRun will filter completed taskrun
func GetPipelineRunOwner ¶
func GetPipelineRunOwner(taskrun v1beta1.TaskRun) (exist bool, owner metav1.OwnerReference)
GetPipelineRunOwner return pipelinerun owner for taskrun if exist
func GetPipelineSpec ¶ added in v0.10.0
func GetPipelineSpec(pr *v1beta1.PipelineRun) *v1beta1.PipelineSpec
GetPipelineSpec return pipelineSpec from pipelinerun
func GetWorkspaceBindings ¶ added in v0.10.0
func GetWorkspaceBindings(ctx context.Context, pr *v1beta1.PipelineRun) ([]v1beta1.WorkspaceBinding, error)
GetWorkspaceBindings returns workspace binding from pipeineRun
func InjectPipelineRunMeta ¶
func InjectPipelineRunMeta(pr *v1beta1.PipelineRun, meta PipelineRunMeta) error
InjectPipelineRunMeta injects encoded meta.json into pipelinerun's annotation
func IsCompletedTaskRun ¶
IsCompletedTaskRun return true if taskrun is completed
func Replacements ¶ added in v0.9.0
func Replacements(ctx context.Context, paramSpecs []v1beta1.ParamSpec, params []v1beta1.Param) (stringReplacements map[string]string, arrayReplacements map[string][]string, objectReplacements map[string]map[string]string)
Replacements return replacements base on the params spec and provided params values
func SortTaskRunByCompletion ¶
func SortTaskRunByCompletion(list *v1beta1.TaskRunList)
SortTaskRunByCompletion will sort TaskRunList by completion time
func WithDefaultConfig ¶ added in v0.11.0
func WithDefaultConfig(ctx context.Context, options ...ConfigOptions) context.Context
WithDefaultConfig sets the default config
Types ¶
type ConfigOptions ¶ added in v0.11.0
ConfigOptions is a function that can modify the config
func WithEnableAPIFields ¶ added in v0.11.0
func WithEnableAPIFields() ConfigOptions
WithEnableAPIFields enables the alpha API fields
func WithEnableCELInWhenExpression ¶ added in v0.11.0
func WithEnableCELInWhenExpression(enabled bool) ConfigOptions
WithEnableCELInWhenExpression enables the CEL in when expression
func WithEnableParamEnum ¶ added in v0.11.0
func WithEnableParamEnum(enabled bool) ConfigOptions
WithEnableParamEnum enables the enum for params
type PipelineRunMeta ¶
type PipelineRunMeta struct { // RunRefs are owner's of pipelinerun from top to bottom RunRefs []*v1.ObjectReference `json:"runRefs,omitempty"` }
PipelineRunMeta defines fields injecting to pipelinerun
func UnmarshalMeta ¶
func UnmarshalMeta(metaJsonString string) (*PipelineRunMeta, error)
UnmarshalMeta unmarshal pipelinerun meta
func (*PipelineRunMeta) Encode ¶
func (m *PipelineRunMeta) Encode() (string, error)
type TaskRunListSortByCompletion ¶
type TaskRunListSortByCompletion v1beta1.TaskRunList
TaskRunListSortByCompletion represent tekton.TaskRunList but will sort by completion time
func (*TaskRunListSortByCompletion) Len ¶
func (s *TaskRunListSortByCompletion) Len() int
Len implement sort interface
func (*TaskRunListSortByCompletion) Less ¶
func (s *TaskRunListSortByCompletion) Less(i, j int) bool
Less implement sort interface
func (*TaskRunListSortByCompletion) Swap ¶
func (s *TaskRunListSortByCompletion) Swap(i, j int)
Swap implement sort interface