Documentation
¶
Index ¶
- func SetupController(manager ctrl.Manager, log *logr.Logger) error
- type Adapter
- func (a *Adapter) EnsureIntegrationTestReportedToGitProvider() (controller.OperationResult, error)
- func (a *Adapter) EnsurePRGroupAnnotated() (controller.OperationResult, error)
- func (a *Adapter) EnsurePipelineIsFinalized() (controller.OperationResult, error)
- func (a *Adapter) EnsureSnapshotExists() (result controller.OperationResult, err error)
- func (a *Adapter) ReportIntegrationTestStatusAccordingToBuildPLR(pipelineRun *tektonv1.PipelineRun, snapshot *applicationapiv1alpha1.Snapshot, ...) error
- type AdapterInterface
- type Reconciler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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) EnsureIntegrationTestReportedToGitProvider ¶
func (a *Adapter) EnsureIntegrationTestReportedToGitProvider() (controller.OperationResult, error)
EnsureIntegrationTestReportedToGitProvider is an operation that will ensure that the integration test status is initialized as pending state when build PLR is triggered/retriggered or cancelled/failed when failing to create snapshot to prevent PR/MR from being automerged unexpectedly and also show the snapshot creation failure on PR/MR
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.
func (*Adapter) ReportIntegrationTestStatusAccordingToBuildPLR ¶
func (a *Adapter) ReportIntegrationTestStatusAccordingToBuildPLR(pipelineRun *tektonv1.PipelineRun, snapshot *applicationapiv1alpha1.Snapshot, integrationTestScenarios *[]v1beta2.IntegrationTestScenario, integrationTestStatus intgteststat.IntegrationTestStatus, component *applicationapiv1alpha1.Component) error
type AdapterInterface ¶
type AdapterInterface interface { EnsurePipelineIsFinalized() (controller.OperationResult, error) EnsurePRGroupAnnotated() (controller.OperationResult, error) EnsureSnapshotExists() (controller.OperationResult, error) EnsureIntegrationTestReportedToGitProvider() (controller.OperationResult, error) }
AdapterInterface is an interface defining all the operations that should be defined in an Integration adapter.
type Reconciler ¶
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.