tekton

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package tekton contains useful functionality for tekton resource.

Index

Constants

View Source
const PodAnnotationMetaJson = metav1alpha1.PodAnnotationKeyPrefix + "meta.json"

PodAnnotationMetaJson for annotation injecting meta.json file to pipelinerun

Variables

This section is empty.

Functions

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 InjectPipelineRunMeta

func InjectPipelineRunMeta(pr *v1beta1.PipelineRun, meta PipelineRunMeta) error

InjectPipelineRunMeta injects encoded meta.json into pipelinerun's annotation

func IsCompletedTaskRun

func IsCompletedTaskRun(taskRun v1beta1.TaskRun) bool

IsCompletedTaskRun return true if taskrun is completed

func SortTaskRunByCompletion

func SortTaskRunByCompletion(list *v1beta1.TaskRunList)

SortTaskRunByCompletion will sort TaskRunList by completion time

Types

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

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

Jump to

Keyboard shortcuts

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