statusreport

package
v0.0.0-...-624a761 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const SnapshotRetryTimeout = time.Duration(3 * time.Hour)

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 snapshot's test status report.

func NewAdapter

NewAdapter creates and returns an Adapter instance.

func (*Adapter) EnsureSnapshotFinishedAllTests

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

EnsureSnapshotFinishedAllTests is an operation that will ensure that a pipeline Snapshot to the PipelineRun being processed finished and passed all tests for all defined required IntegrationTestScenarios.

func (*Adapter) EnsureSnapshotTestStatusReportedToGitProvider

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

EnsureSnapshotTestStatusReportedToGitProvider will ensure that integration test status is reported to the git provider which (indirectly) triggered its execution. The status is reported to git provider if it is a component snapshot Or reported to git providers which trigger component snapshots included in group snapshot if it is a group snapshot

func (*Adapter) ReportSnapshotStatus

func (a *Adapter) ReportSnapshotStatus(testedSnapshot *applicationapiv1alpha1.Snapshot) error

ReportSnapshotStatus reports status of all integration tests into Pull Requests from component snapshot or group snapshot

type AdapterInterface

type AdapterInterface interface {
	EnsureSnapshotTestStatusReportedToGitHub() (controller.OperationResult, error)
	EnsureSnapshotFinishedAllTests() (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 an Snapshot object

func NewStatusReportReconciler

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

NewStatusReportReconciler 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