objects

package
v0.19.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const PipelineTaskLabel = "tekton.dev/pipelineTask"

Label added to TaskRuns identifying the associated pipeline Task

Variables

This section is empty.

Functions

This section is empty.

Types

type Object

type Object interface {
	// Metadata associated to all Kubernetes objects
	metav1.Object
	// Runtime identifying data
	runtime.Object
}

Object is used as a base object of all Kubernetes objects ref: https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.9.4/pkg/client#Object

type PipelineRunObject

type PipelineRunObject struct {
	// The base PipelineRun
	*v1beta1.PipelineRun
	// contains filtered or unexported fields
}

PipelineRunObject extends v1beta1.PipelineRun with additional functions.

func NewPipelineRunObject

func NewPipelineRunObject(pr *v1beta1.PipelineRun) *PipelineRunObject

func (*PipelineRunObject) AppendTaskRun

func (pro *PipelineRunObject) AppendTaskRun(tr *v1beta1.TaskRun)

Append TaskRuns to this PipelineRun

func (*PipelineRunObject) GetGVK

func (pro *PipelineRunObject) GetGVK() string

Get the PipelineRun GroupVersionKind

func (*PipelineRunObject) GetKindName added in v0.17.0

func (pro *PipelineRunObject) GetKindName() string

func (*PipelineRunObject) GetLatestAnnotations

func (pro *PipelineRunObject) GetLatestAnnotations(ctx context.Context, clientSet versioned.Interface) (map[string]string, error)

Request the current annotations on the PipelineRun object

func (*PipelineRunObject) GetObject

func (pro *PipelineRunObject) GetObject() interface{}

Get the base PipelineRun

func (*PipelineRunObject) GetProvenance added in v0.18.0

func (pro *PipelineRunObject) GetProvenance() *v1beta1.Provenance

func (*PipelineRunObject) GetPullSecrets

func (pro *PipelineRunObject) GetPullSecrets() []string

Get the imgPullSecrets from the pod template

func (*PipelineRunObject) GetRemoteProvenance added in v0.18.0

func (pro *PipelineRunObject) GetRemoteProvenance() *v1beta1.Provenance

func (*PipelineRunObject) GetResults

func (pro *PipelineRunObject) GetResults() []Result

Get the resolved Pipelinerun results

func (*PipelineRunObject) GetServiceAccountName

func (pro *PipelineRunObject) GetServiceAccountName() string

Get the ServiceAccount declared in the PipelineRun

func (*PipelineRunObject) GetTaskRunFromTask

func (pro *PipelineRunObject) GetTaskRunFromTask(taskName string) *TaskRunObject

Get the associated TaskRun via the Task name

func (*PipelineRunObject) IsRemote added in v0.18.0

func (pro *PipelineRunObject) IsRemote() bool

func (*PipelineRunObject) IsSuccessful

func (pro *PipelineRunObject) IsSuccessful() bool

Get the ServiceAccount declared in the PipelineRun

func (*PipelineRunObject) Patch

func (pro *PipelineRunObject) Patch(ctx context.Context, clientSet versioned.Interface, patchBytes []byte) error

Patch the original PipelineRun object

func (*PipelineRunObject) SupportsOCIArtifact added in v0.17.0

func (pro *PipelineRunObject) SupportsOCIArtifact() bool

func (*PipelineRunObject) SupportsPipelineRunArtifact added in v0.17.0

func (pro *PipelineRunObject) SupportsPipelineRunArtifact() bool

func (*PipelineRunObject) SupportsTaskRunArtifact added in v0.17.0

func (pro *PipelineRunObject) SupportsTaskRunArtifact() bool

type Result

type Result struct {
	Name  string
	Type  v1beta1.ResultsType
	Value v1beta1.ParamValue
}

Result is a generic key value store containing the results of Tekton operations. (eg. PipelineRun and TaskRun results)

type TaskRunObject

type TaskRunObject struct {
	*v1beta1.TaskRun
}

TaskRunObject extends v1beta1.TaskRun with additional functions.

func NewTaskRunObject

func NewTaskRunObject(tr *v1beta1.TaskRun) *TaskRunObject

func (*TaskRunObject) GetGVK

func (tro *TaskRunObject) GetGVK() string

Get the TaskRun GroupVersionKind

func (*TaskRunObject) GetKindName added in v0.17.0

func (tro *TaskRunObject) GetKindName() string

func (*TaskRunObject) GetLatestAnnotations

func (tro *TaskRunObject) GetLatestAnnotations(ctx context.Context, clientSet versioned.Interface) (map[string]string, error)

Get the latest annotations on the TaskRun

func (*TaskRunObject) GetObject

func (tro *TaskRunObject) GetObject() interface{}

Get the base TaskRun object

func (*TaskRunObject) GetProvenance added in v0.18.0

func (tro *TaskRunObject) GetProvenance() *v1beta1.Provenance

func (*TaskRunObject) GetPullSecrets

func (tro *TaskRunObject) GetPullSecrets() []string

Get the imgPullSecrets from the pod template

func (*TaskRunObject) GetRemoteProvenance added in v0.18.0

func (tro *TaskRunObject) GetRemoteProvenance() *v1beta1.Provenance

func (*TaskRunObject) GetResults

func (tro *TaskRunObject) GetResults() []Result

Get the TaskRun results

func (*TaskRunObject) GetServiceAccountName

func (tro *TaskRunObject) GetServiceAccountName() string

Get the ServiceAccount declared in the TaskRun

func (*TaskRunObject) GetSidecarImages added in v0.18.0

func (tro *TaskRunObject) GetSidecarImages() []string

func (*TaskRunObject) GetStepImages added in v0.18.0

func (tro *TaskRunObject) GetStepImages() []string

func (*TaskRunObject) IsRemote added in v0.18.0

func (tro *TaskRunObject) IsRemote() bool

func (*TaskRunObject) Patch

func (tro *TaskRunObject) Patch(ctx context.Context, clientSet versioned.Interface, patchBytes []byte) error

Patch the original TaskRun object

func (*TaskRunObject) SupportsOCIArtifact added in v0.17.0

func (tro *TaskRunObject) SupportsOCIArtifact() bool

func (*TaskRunObject) SupportsPipelineRunArtifact added in v0.17.0

func (tro *TaskRunObject) SupportsPipelineRunArtifact() bool

func (*TaskRunObject) SupportsTaskRunArtifact added in v0.17.0

func (tro *TaskRunObject) SupportsTaskRunArtifact() bool

type TektonObject

type TektonObject interface {
	Object
	GetGVK() string
	GetKindName() string
	GetObject() interface{}
	GetLatestAnnotations(ctx context.Context, clientSet versioned.Interface) (map[string]string, error)
	Patch(ctx context.Context, clientSet versioned.Interface, patchBytes []byte) error
	GetResults() []Result
	GetProvenance() *v1beta1.Provenance
	GetServiceAccountName() string
	GetPullSecrets() []string
	IsDone() bool
	IsSuccessful() bool
	SupportsTaskRunArtifact() bool
	SupportsPipelineRunArtifact() bool
	SupportsOCIArtifact() bool
	GetRemoteProvenance() *v1beta1.Provenance
	IsRemote() bool
}

Tekton object is an extended Kubernetes object with operations specific to Tekton objects.

func NewTektonObject

func NewTektonObject(i interface{}) (TektonObject, error)

Jump to

Keyboard shortcuts

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