tekton

package
v0.0.0-...-609d079 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MountOptions

type MountOptions struct {
	// Which task to mount to. If empty, defaults to xxx (e.g., "renovate")
	TaskName string
	// Which steps to mount to. If empty, mounts to all steps
	StepNames []string
	// If the mount should be read-only. Default is true
	ReadOnly *bool
	// The permission mode for the mounted files
	DefaultMode *int32
	// Optional specifies whether the ConfigMap/Secret must exist
	Optional *bool
}

func NewMountOptions

func NewMountOptions() *MountOptions

NewMountOptions creates a new MountOptions with default values

func (*MountOptions) WithDefaultMode

func (o *MountOptions) WithDefaultMode(mode int32) *MountOptions

func (*MountOptions) WithOptional

func (o *MountOptions) WithOptional(optional bool) *MountOptions

func (*MountOptions) WithReadOnly

func (o *MountOptions) WithReadOnly(readOnly bool) *MountOptions

func (*MountOptions) WithStepNames

func (o *MountOptions) WithStepNames(stepNames []string) *MountOptions

func (*MountOptions) WithTaskName

func (o *MountOptions) WithTaskName(taskName string) *MountOptions

type PipelineRunBuilder

type PipelineRunBuilder struct {
	// contains filtered or unexported fields
}

func NewPipelineRunBuilder

func NewPipelineRunBuilder(name, namespace string) *PipelineRunBuilder

NewPipelineRunBuilder initializes a new PipelineRunBuilder with the given name prefix and namespace. It sets the name of the PipelineRun to be generated with the provided prefix and sets its namespace.

func (*PipelineRunBuilder) Build

Build returns the constructed PipelineRun and any accumulated error.

func (*PipelineRunBuilder) WithAnnotations

func (b *PipelineRunBuilder) WithAnnotations(annotations map[string]string) *PipelineRunBuilder

WithAnnotations appends or updates annotations to the PipelineRun's metadata. If the PipelineRun does not have existing annotations, it initializes them before adding.

func (*PipelineRunBuilder) WithConfigMap

func (b *PipelineRunBuilder) WithConfigMap(name, mountPath string, items []corev1.KeyToPath, opts *MountOptions) *PipelineRunBuilder

Mounts a ConfigMap to the specified task and steps. - name: ConfigMap name - mountPath: where the ConfigMap should be mounted to - items: items from ConfigMap to be mounted. If nil, all items will be mounted - opts: mount options

func (*PipelineRunBuilder) WithFinalizer

func (b *PipelineRunBuilder) WithFinalizer(finalizer string) *PipelineRunBuilder

WithFinalizer adds the given finalizer to the PipelineRun's metadata.

func (*PipelineRunBuilder) WithLabels

func (b *PipelineRunBuilder) WithLabels(labels map[string]string) *PipelineRunBuilder

WithLabels appends or updates labels to the PipelineRun's metadata. If the PipelineRun does not have existing labels, it initializes them before adding.

func (*PipelineRunBuilder) WithObjectReferences

func (b *PipelineRunBuilder) WithObjectReferences(objects ...client.Object) *PipelineRunBuilder

WithObjectReferences constructs tektonv1.Param entries for each of the provided client.Objects. Each param name is derived from the object's Kind (with the first letter made lowercase) and the value is a combination of the object's Namespace and Name.

func (*PipelineRunBuilder) WithObjectSpecsAsJson

func (b *PipelineRunBuilder) WithObjectSpecsAsJson(objects ...client.Object) *PipelineRunBuilder

WithObjectSpecsAsJson constructs tektonv1.Param entries for the Spec field of each of the provided client.Objects. Each param name is derived from the object's Kind (with the first letter made lowercase). The value for each param is the JSON representation of the object's Spec. If an error occurs during extraction or serialization, it's accumulated in the builder's err field using multierror.

func (*PipelineRunBuilder) WithParams

func (b *PipelineRunBuilder) WithParams(params ...tektonv1.Param) *PipelineRunBuilder

WithParams appends the provided params to the PipelineRun's spec.

func (*PipelineRunBuilder) WithSecret

func (b *PipelineRunBuilder) WithSecret(name, mountPath string, items []corev1.KeyToPath, opts *MountOptions) *PipelineRunBuilder

Mounts a Secret to the specified task and steps. - name: Secret name - mountPath: where the Secret should be mounted to - items: items from Secret to be mounted. If nil, all items will be mounted - opts: mount options

func (*PipelineRunBuilder) WithServiceAccount

func (b *PipelineRunBuilder) WithServiceAccount(serviceAccount string) *PipelineRunBuilder

WithServiceAccount sets the ServiceAccountName for the PipelineRun's TaskRunTemplate.

func (*PipelineRunBuilder) WithTimeouts

func (b *PipelineRunBuilder) WithTimeouts(timeouts, defaultTimeouts *tektonv1.TimeoutFields) *PipelineRunBuilder

WithTimeouts sets the Timeouts for the PipelineRun.

Jump to

Keyboard shortcuts

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