inrepo

package
v0.0.883 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// TektonAPIVersion the default tekton API version
	TektonAPIVersion = "tekton.dev/v1beta1"

	// DefaultParameters the annotation used to disable default parameters
	DefaultParameters = "lighthouse.jenkins-x.io/defaultParameters"

	// LoadFileRefPattern the regular expression to match which Pipeline/Task references to load via files
	LoadFileRefPattern = "lighthouse.jenkins-x.io/loadFileRefs"

	// PrependStepURL loads the steps from the given URL and prepends them to the given Task
	PrependStepURL = "lighthouse.jenkins-x.io/prependStepsURL"

	// AppendStepURL loads the steps from the given URL and appends them to the end of the Task steps
	AppendStepURL = "lighthouse.jenkins-x.io/appendStepsURL"
)

Variables

This section is empty.

Functions

func ConvertPipelineToPipelineRun added in v0.0.858

func ConvertPipelineToPipelineRun(from *tektonv1beta1.Pipeline, message string, defaultValues *DefaultValues) (*tektonv1beta1.PipelineRun, error)

ConvertPipelineToPipelineRun converts the Pipeline to a PipelineRun

func ConvertTaskRunToPipelineRun added in v0.0.858

func ConvertTaskRunToPipelineRun(from *tektonv1beta1.TaskRun, message string, defaultValues *DefaultValues) (*tektonv1beta1.PipelineRun, error)

ConvertTaskRunToPipelineRun converts the TaskRun to a PipelineRun

func ConvertTaskToPipelineRun added in v0.0.858

func ConvertTaskToPipelineRun(from *tektonv1beta1.Task, message string, defaultValues *DefaultValues) (*tektonv1beta1.PipelineRun, error)

ConvertTaskToPipelineRun converts the Task to a PipelineRun

func DefaultPipelineParameters added in v0.0.866

func DefaultPipelineParameters(prs *v1beta1.PipelineRun) (*v1beta1.PipelineRun, error)

DefaultPipelineParameters defaults the parameter specs and parameter values from lighthouse onto the PipelineRun and its nested PipelineSpec and Tasks

func Generate

func Generate(fileBrowser filebrowser.Interface, sharedConfig *config.Config, sharedPlugins *plugins.Configuration, owner, repo, eventRef string) (*config.Config, *plugins.Configuration, error)

Generate generates the in repository config if enabled for this repository otherwise return the shared config

func IsScmNotFound added in v0.0.858

func IsScmNotFound(err error) bool

IsScmNotFound returns true if the error is a not found error

func LoadTektonResourceAsPipelineRun added in v0.0.858

func LoadTektonResourceAsPipelineRun(data []byte, dir, message string, getData func(path string) ([]byte, error), defaultValues *DefaultValues) (*tektonv1beta1.PipelineRun, error)

LoadTektonResourceAsPipelineRun loads a PipelineRun, Pipeline, Task or TaskRun and convert it to a PipelineRun if necessary

func LoadTriggerConfig

func LoadTriggerConfig(fileBrowser filebrowser.Interface, ownerName string, repoName string, sha string) (*triggerconfig.Config, error)

LoadTriggerConfig loads the `lighthouse.yaml` configuration files in the repository

func MergeTriggers

func MergeTriggers(cfg *config.Config, pluginCfg *plugins.Configuration, fileBrowser filebrowser.Interface, ownerName string, repoName string, sha string) (bool, error)

MergeTriggers merges the configuration with any `lighthouse.yaml` files in the repository

func ToParamSpecs added in v0.0.858

func ToParamSpecs(params []tektonv1beta1.Param) []tektonv1beta1.ParamSpec

ToParamSpecs generates param specs from the params

func ToParams added in v0.0.858

func ToParams(params []tektonv1beta1.ParamSpec) []tektonv1beta1.Param

ToParams converts the param specs to params

func ToPipelineInput added in v0.0.858

ToPipelineInput converts the task resource into pipeline inputs

func ToPipelineInputs added in v0.0.858

ToPipelineInputs converts the task resources into pipeline inputs

func ToPipelineOutput added in v0.0.858

ToPipelineOutput converts the task resource into pipeline outputs

func ToPipelineOutputs added in v0.0.858

ToPipelineOutputs converts the task resources into pipeline outputs

func ToPipelineResources added in v0.0.858

func ToPipelineResources(resources *tektonv1beta1.TaskResources) *tektonv1beta1.PipelineTaskResources

ToPipelineResources converts the task resources to piepline resources

func ToPipelineWorkspaceDeclaration added in v0.0.858

ToPipelineWorkspaceDeclaration converts the workspace declaration to a pipeline workspace declaration

func ToPipelineWorkspaceDeclarations added in v0.0.858

func ToPipelineWorkspaceDeclarations(workspaces []tektonv1beta1.WorkspaceDeclaration) []tektonv1beta1.PipelineWorkspaceDeclaration

ToPipelineWorkspaceDeclarations converts the workspace declarations to pipeline workspace declarations

func ToWorkspaceBinding added in v0.0.858

ToWorkspaceBinding converts the workspace declaration to a workspaces binding

func ToWorkspaceBindings added in v0.0.858

func ToWorkspaceBindings(workspaces []tektonv1beta1.WorkspaceDeclaration) []tektonv1beta1.WorkspaceBinding

ToWorkspaceBindings converts the workspace declarations to workspaces bindings

func ToWorkspacePipelineTaskBinding added in v0.0.858

func ToWorkspacePipelineTaskBinding(from tektonv1beta1.WorkspaceBinding) tektonv1beta1.WorkspacePipelineTaskBinding

ToWorkspacePipelineTaskBinding converts the workspace binding to a pipeline task binding

func ToWorkspacePipelineTaskBindings added in v0.0.858

func ToWorkspacePipelineTaskBindings(workspaces []tektonv1beta1.WorkspaceBinding) []tektonv1beta1.WorkspacePipelineTaskBinding

ToWorkspacePipelineTaskBindings converts the workspace bindings to pipeline task bindings

func ToWorkspacePipelineTaskBindingsFromDeclaration added in v0.0.858

func ToWorkspacePipelineTaskBindingsFromDeclaration(from tektonv1beta1.WorkspaceDeclaration) tektonv1beta1.WorkspacePipelineTaskBinding

ToWorkspacePipelineTaskBindingsFromDeclaration converts the workspace declaration to a pipeline task binding

func ToWorkspacePipelineTaskBindingsFromDeclarations added in v0.0.858

func ToWorkspacePipelineTaskBindingsFromDeclarations(workspaces []tektonv1beta1.WorkspaceDeclaration) []tektonv1beta1.WorkspacePipelineTaskBinding

ToWorkspacePipelineTaskBindingsFromDeclarations converts the workspace declarations to pipeline task bindings

Types

type DefaultValues added in v0.0.858

type DefaultValues struct {
	// ServiceAccountName
	ServiceAccountName string
	//  Timeout
	Timeout *metav1.Duration
}

DefaultValues default values applied to a PipelineRun if wrapping a Pipeline/Task/TaskRun as a PipelineRun

func NewDefaultValues added in v0.0.858

func NewDefaultValues() (*DefaultValues, error)

NewDefaultValues creatse a new default values

func (*DefaultValues) Apply added in v0.0.858

func (v *DefaultValues) Apply(prs *tektonv1beta1.PipelineRun)

Apply adds any default values that are empty in the generated PipelineRun

Jump to

Keyboard shortcuts

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