pipelines

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Overview

Package pipelines provides services for triggering CI/CD pipelines across different git providers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MultiProviderPipelineService

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

MultiProviderPipelineService dynamically dispatches pipeline operations to the correct provider based on git server settings.

func NewMultiProviderPipelineService

func NewMultiProviderPipelineService() *MultiProviderPipelineService

NewMultiProviderPipelineService creates a service with all available provider implementations.

func (*MultiProviderPipelineService) TriggerPipeline

func (m *MultiProviderPipelineService) TriggerPipeline(
	ctx context.Context,
	project string,
	ref string,
	variables []models.PipelineVariable,
	settings krci.GitServerSettings,
) (*models.PipelineResponse, error)

TriggerPipeline dispatches the pipeline trigger request to the appropriate provider based on the git provider specified in settings.

type PipelineProvider

type PipelineProvider interface {
	TriggerPipeline(
		ctx context.Context,
		project string,
		ref string,
		variables []models.PipelineVariable,
		settings krci.GitServerSettings,
	) (*models.PipelineResponse, error)
}

PipelineProvider defines the interface for triggering CI/CD pipelines. This interface must be implemented by all git providers (GitLab, GitHub, Bitbucket).

type PipelinesService

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

PipelinesService handles pipeline operations by coordinating between git server settings and provider-specific implementations.

func NewPipelinesService

func NewPipelinesService(
	gitServerService *krci.GitServerService,
	pipelinesProvider *MultiProviderPipelineService,
) *PipelinesService

NewPipelinesService creates a new PipelinesService.

func (*PipelinesService) TriggerPipeline

func (s *PipelinesService) TriggerPipeline(
	ctx context.Context,
	gitServerName string,
	project string,
	ref string,
	variables []models.PipelineVariable,
) (*models.PipelineResponse, error)

TriggerPipeline triggers a CI/CD pipeline for the specified git server, project, and ref. It fetches git server settings from Kubernetes and delegates to the appropriate provider.

Jump to

Keyboard shortcuts

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