dsl

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnnotateSource

func AnnotateSource(evtID string, src *Source) func(*pipelinev1.PipelineRun)

AnnotateSource is a PipelineRun optionFunc which annodates the pipelinerun with the provided event ID and source URL.

func Convert

func Convert(p *ci.Pipeline, log logger.Logger, config *Configuration, src *Source, volumeClaimName string, ctx *cel.Context, id string) (*pipelinev1.PipelineRun, error)

Convert takes a Pipeline definition, a name, source and volume claim name, and generates a TektonCD PipelineRun with an embedded Pipeline with the tasks to execute.

Types

type Configuration

type Configuration struct {
	ArchiverImage             string            // Executed for tasks that have artifacts to archive.
	ArchiveURL                string            // Passed to the archiver along with the artifact paths.
	PipelineRunPrefix         string            // Used in the generateName property of the created PipelineRun.
	DefaultServiceAccountName string            // The default service account for created PipelineRuns.
	VolumeSize                resource.Quantity // The size to create volumes as.
}

Configuration provides options for the conversion to PipelineRuns.

type DSLConverter

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

func NewDSLConverter

func NewDSLConverter(
	scmClient git.SCM,
	pipelineClient pipelineclientset.Interface,
	volumeCreator volumes.Creator,
	m metrics.Interface, cfg *Configuration,
	namespace string, l logger.Logger) *DSLConverter

NewDSLConverter creates and returns a converter.

type Handler

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

Handler implements the GitEventHandler interface and processes .tekton_ci.yaml files in a repository.

func New

func New(scmClient git.SCM, l logger.Logger, m metrics.Interface, d *DSLConverter) *Handler

New creates and returns a new Handler for converting ci.Pipelines into PipelineRuns.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Source

type Source struct {
	RepoURL string
	Ref     string
}

Source wraps a git clone URL and a specific ref to checkout.

Jump to

Keyboard shortcuts

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