Documentation
¶
Overview ¶
Package pipelines provides services for triggering CI/CD pipelines across different git providers.
Index ¶
- type MultiProviderPipelineService
- func (m *MultiProviderPipelineService) GetCache() *sturdyc.Client[models.PipelinesResponse]
- func (m *MultiProviderPipelineService) ListPipelines(ctx context.Context, project string, settings krci.GitServerSettings, ...) (*models.PipelinesResponse, error)
- func (m *MultiProviderPipelineService) TriggerPipeline(ctx context.Context, project string, ref string, ...) (*models.PipelineResponse, error)
- type PipelineProvider
- type PipelinesService
- func (s *PipelinesService) GetProvider() *MultiProviderPipelineService
- func (s *PipelinesService) ListPipelines(ctx context.Context, gitServerName string, project string, ...) (*models.PipelinesResponse, error)
- func (s *PipelinesService) TriggerPipeline(ctx context.Context, gitServerName string, project string, ref string, ...) (*models.PipelineResponse, error)
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) GetCache ¶ added in v0.3.0
func (m *MultiProviderPipelineService) GetCache() *sturdyc.Client[models.PipelinesResponse]
GetCache returns the pipeline cache instance for cache management.
func (*MultiProviderPipelineService) ListPipelines ¶ added in v0.3.0
func (m *MultiProviderPipelineService) ListPipelines( ctx context.Context, project string, settings krci.GitServerSettings, opts models.PipelineListOptions, ) (*models.PipelinesResponse, error)
ListPipelines dispatches the pipeline listing request to the appropriate provider with caching.
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)
ListPipelines(
ctx context.Context,
project string,
settings krci.GitServerSettings,
opts models.PipelineListOptions,
) (*models.PipelinesResponse, error)
}
PipelineProvider defines the interface for CI/CD pipeline operations. 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( pipelinesProvider *MultiProviderPipelineService, gitServerService *krci.GitServerService, ) *PipelinesService
NewPipelinesService creates a new PipelinesService.
func (*PipelinesService) GetProvider ¶ added in v0.3.0
func (s *PipelinesService) GetProvider() *MultiProviderPipelineService
GetProvider returns the underlying multi-provider service for direct access to its cache.
func (*PipelinesService) ListPipelines ¶ added in v0.3.0
func (s *PipelinesService) ListPipelines( ctx context.Context, gitServerName string, project string, opts models.PipelineListOptions, ) (*models.PipelinesResponse, error)
ListPipelines lists CI/CD pipelines for the specified git server and project. It fetches git server settings from Kubernetes and delegates to the appropriate provider.
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.