Documentation
¶
Index ¶
- func FilterPipelineRunByState(ctx context.Context, tekton versioned2.Interface, orderList []string, ...) []string
- func PrKey(run *tektonv1.PipelineRun) string
- func RepoKey(repo *v1alpha1.Repository) string
- type Manager
- func (qm *Manager) AddListToRunningQueue(repo *v1alpha1.Repository, list []string) ([]string, error)
- func (qm *Manager) AddToPendingQueue(repo *v1alpha1.Repository, list []string) error
- func (qm *Manager) InitQueues(ctx context.Context, tekton versioned2.Interface, pac versioned.Interface) error
- func (qm *Manager) QueuedPipelineRuns(repo *v1alpha1.Repository) []string
- func (qm *Manager) RemoveAndTakeItemFromQueue(repo *v1alpha1.Repository, run *tektonv1.PipelineRun) string
- func (qm *Manager) RemoveFromQueue(repoKey, prKey string) bool
- func (qm *Manager) RemoveRepository(repo *v1alpha1.Repository)
- func (qm *Manager) RunningPipelineRuns(repo *v1alpha1.Repository) []string
- type ManagerInterface
- type Semaphore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterPipelineRunByState ¶
func FilterPipelineRunByState(ctx context.Context, tekton versioned2.Interface, orderList []string, wantedStatus, wantedState string) []string
FilterPipelineRunByInProgress filters the given list of PipelineRun names to only include those that are in a "queued" state and have a pending status. It retrieves the PipelineRun objects from the Tekton API and checks their annotations and status to determine if they should be included.
Returns A list of PipelineRun names that are in a "queued" state and have a pending status.
func PrKey ¶
func PrKey(run *tektonv1.PipelineRun) string
func RepoKey ¶
func RepoKey(repo *v1alpha1.Repository) string
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(logger *zap.SugaredLogger) *Manager
func (*Manager) AddListToRunningQueue ¶
func (qm *Manager) AddListToRunningQueue(repo *v1alpha1.Repository, list []string) ([]string, error)
AddListToRunningQueue adds the pipelineRun to the waiting queue of the repository and if it is at the top and ready to run which means currently running pipelineRun < limit then move it to running queue This adds the pipelineRuns in the same order as in the list.
func (*Manager) AddToPendingQueue ¶
func (qm *Manager) AddToPendingQueue(repo *v1alpha1.Repository, list []string) error
func (*Manager) InitQueues ¶
func (qm *Manager) InitQueues(ctx context.Context, tekton versioned2.Interface, pac versioned.Interface) error
InitQueues rebuild all the queues for all repository if concurrency is defined before reconciler started reconciling them.
func (*Manager) QueuedPipelineRuns ¶
func (qm *Manager) QueuedPipelineRuns(repo *v1alpha1.Repository) []string
func (*Manager) RemoveAndTakeItemFromQueue ¶
func (qm *Manager) RemoveAndTakeItemFromQueue(repo *v1alpha1.Repository, run *tektonv1.PipelineRun) string
func (*Manager) RemoveFromQueue ¶
func (*Manager) RemoveRepository ¶
func (qm *Manager) RemoveRepository(repo *v1alpha1.Repository)
func (*Manager) RunningPipelineRuns ¶
func (qm *Manager) RunningPipelineRuns(repo *v1alpha1.Repository) []string
type ManagerInterface ¶
type ManagerInterface interface {
InitQueues(ctx context.Context, tekton tektonVersionedClient.Interface, pac versioned.Interface) error
RemoveRepository(repo *v1alpha1.Repository)
QueuedPipelineRuns(repo *v1alpha1.Repository) []string
RunningPipelineRuns(repo *v1alpha1.Repository) []string
AddListToRunningQueue(repo *v1alpha1.Repository, list []string) ([]string, error)
AddToPendingQueue(repo *v1alpha1.Repository, list []string) error
RemoveFromQueue(repoKey, prKey string) bool
RemoveAndTakeItemFromQueue(repo *v1alpha1.Repository, run *tektonv1.PipelineRun) string
}