buildpipeline

package
v0.0.0-...-392d2aa Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupController

func SetupController(manager ctrl.Manager, log *logr.Logger) error

SetupController creates a new Integration controller and adds it to the Manager.

Types

type Adapter

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

Adapter holds the objects needed to reconcile a build PipelineRun.

func NewAdapter

func NewAdapter(context context.Context, pipelineRun *tektonv1.PipelineRun, component *applicationapiv1alpha1.Component, application *applicationapiv1alpha1.Application,
	logger h.IntegrationLogger, loader loader.ObjectLoader, client client.Client,
) *Adapter

NewAdapter creates and returns an Adapter instance.

func (*Adapter) EnsurePRGroupAnnotated

func (a *Adapter) EnsurePRGroupAnnotated() (controller.OperationResult, error)

EnsurePRGroupAnnotated is an operation that will ensure that the pr group info is added to build pipelineRun metadata label and annotation once it is created, then these label and annotation will be copied to component snapshot when it is created

func (*Adapter) EnsurePipelineIsFinalized

func (a *Adapter) EnsurePipelineIsFinalized() (controller.OperationResult, error)

func (*Adapter) EnsureSnapshotExists

func (a *Adapter) EnsureSnapshotExists() (result controller.OperationResult, err error)

EnsureSnapshotExists is an operation that will ensure that a pipeline Snapshot associated to the build PipelineRun being processed exists. Otherwise, it will create a new pipeline Snapshot.

type AdapterInterface

type AdapterInterface interface {
	EnsurePipelineIsFinalized() (controller.OperationResult, error)
	EnsurePRGroupAnnotated() (controller.OperationResult, error)
	EnsureSnapshotExists() (controller.OperationResult, error)
}

AdapterInterface is an interface defining all the operations that should be defined in an Integration adapter.

type Reconciler

type Reconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
}

Reconciler reconciles a build PipelineRun object

func NewIntegrationReconciler

func NewIntegrationReconciler(client client.Client, logger *logr.Logger, scheme *runtime.Scheme) *Reconciler

NewIntegrationReconciler creates and returns a Reconciler.

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

Jump to

Keyboard shortcuts

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