matcher

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2025 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRepo

func GetRepo(ctx context.Context, cs *params.Run, repoName string) (*apipac.Repository, error)

GetRepo get a repo by name anywhere on a cluster.

func GrabPipelineFromAnnotations added in v0.28.0

func GrabPipelineFromAnnotations(annotations map[string]string) (string, error)

func GrabTasksFromAnnotations added in v0.28.0

func GrabTasksFromAnnotations(annotations map[string]string) ([]string, error)

func IncomingWebhookRule

func IncomingWebhookRule(branch string, incomingWebhooks []apipac.Incoming) *apipac.Incoming

IncomingWebhookRule will match a rule to an incoming rule, currently a rule is a target branch.

func MatchEventURLRepo

func MatchEventURLRepo(ctx context.Context, cs *params.Run, event *info.Event, ns string) (*apipac.Repository, error)

func MatchRunningPipelineRunForIncomingWebhook added in v0.21.0

func MatchRunningPipelineRunForIncomingWebhook(eventType, incomingPipelineRun string, prs []*tektonv1.PipelineRun) []*tektonv1.PipelineRun

Types

type Match

type Match struct {
	PipelineRun *tektonv1.PipelineRun
	Repo        *apipac.Repository
	Config      map[string]string
}

func MatchPipelinerunByAnnotation

func MatchPipelinerunByAnnotation(ctx context.Context, logger *zap.SugaredLogger, pruns []*tektonv1.PipelineRun, cs *params.Run, event *info.Event, vcx provider.Interface) ([]Match, error)

type RemoteTasks

type RemoteTasks struct {
	Run               *params.Run
	ProviderInterface provider.Interface
	Event             *info.Event
	Logger            *zap.SugaredLogger
}

func (RemoteTasks) GetPipelineFromAnnotationName added in v0.28.0

func (rt RemoteTasks) GetPipelineFromAnnotationName(ctx context.Context, name string) (*tektonv1.Pipeline, error)

func (RemoteTasks) GetTaskFromAnnotationName added in v0.28.0

func (rt RemoteTasks) GetTaskFromAnnotationName(ctx context.Context, name string) (*tektonv1.Task, error)

Jump to

Keyboard shortcuts

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