Documentation ¶
Index ¶
- Constants
- func ConvertPipelineToPipelineRun(from *tektonv1beta1.Pipeline, message string, defaultValues *DefaultValues) (*tektonv1beta1.PipelineRun, error)
- func ConvertTaskRunToPipelineRun(from *tektonv1beta1.TaskRun, message string, defaultValues *DefaultValues) (*tektonv1beta1.PipelineRun, error)
- func ConvertTaskToPipelineRun(from *tektonv1beta1.Task, message string, defaultValues *DefaultValues) (*tektonv1beta1.PipelineRun, error)
- func DefaultPipelineParameters(prs *v1beta1.PipelineRun) (*v1beta1.PipelineRun, error)
- func Generate(scmClient scmProviderClient, sharedConfig *config.Config, ...) (*config.Config, *plugins.Configuration, error)
- func IsScmNotFound(err error) bool
- func LoadTektonResourceAsPipelineRun(data []byte, dir, message string, getData func(path string) ([]byte, error), ...) (*tektonv1beta1.PipelineRun, error)
- func LoadTriggerConfig(scmClient scmProviderClient, ownerName string, repoName string, sha string) (*triggerconfig.Config, error)
- func MergeTriggers(cfg *config.Config, pluginCfg *plugins.Configuration, ...) (bool, error)
- func ToParamSpecs(params []tektonv1beta1.Param) []tektonv1beta1.ParamSpec
- func ToParams(params []tektonv1beta1.ParamSpec) []tektonv1beta1.Param
- func ToPipelineInput(from tektonv1beta1.TaskResource) tektonv1beta1.PipelineTaskInputResource
- func ToPipelineInputs(inputs []tektonv1beta1.TaskResource) []tektonv1beta1.PipelineTaskInputResource
- func ToPipelineOutput(from tektonv1beta1.TaskResource) tektonv1beta1.PipelineTaskOutputResource
- func ToPipelineOutputs(inputs []tektonv1beta1.TaskResource) []tektonv1beta1.PipelineTaskOutputResource
- func ToPipelineResources(resources *tektonv1beta1.TaskResources) *tektonv1beta1.PipelineTaskResources
- func ToPipelineWorkspaceDeclaration(from tektonv1beta1.WorkspaceDeclaration) tektonv1beta1.PipelineWorkspaceDeclaration
- func ToPipelineWorkspaceDeclarations(workspaces []tektonv1beta1.WorkspaceDeclaration) []tektonv1beta1.PipelineWorkspaceDeclaration
- func ToWorkspaceBinding(from tektonv1beta1.WorkspaceDeclaration) tektonv1beta1.WorkspaceBinding
- func ToWorkspaceBindings(workspaces []tektonv1beta1.WorkspaceDeclaration) []tektonv1beta1.WorkspaceBinding
- func ToWorkspacePipelineTaskBinding(from tektonv1beta1.WorkspaceBinding) tektonv1beta1.WorkspacePipelineTaskBinding
- func ToWorkspacePipelineTaskBindings(workspaces []tektonv1beta1.WorkspaceBinding) []tektonv1beta1.WorkspacePipelineTaskBinding
- func ToWorkspacePipelineTaskBindingsFromDeclaration(from tektonv1beta1.WorkspaceDeclaration) tektonv1beta1.WorkspacePipelineTaskBinding
- func ToWorkspacePipelineTaskBindingsFromDeclarations(workspaces []tektonv1beta1.WorkspaceDeclaration) []tektonv1beta1.WorkspacePipelineTaskBinding
- type DefaultValues
Constants ¶
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(scmClient scmProviderClient, 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
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(scmClient scmProviderClient, 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, scmClient scmProviderClient, 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
func ToPipelineInput(from tektonv1beta1.TaskResource) tektonv1beta1.PipelineTaskInputResource
ToPipelineInput converts the task resource into pipeline inputs
func ToPipelineInputs ¶ added in v0.0.858
func ToPipelineInputs(inputs []tektonv1beta1.TaskResource) []tektonv1beta1.PipelineTaskInputResource
ToPipelineInputs converts the task resources into pipeline inputs
func ToPipelineOutput ¶ added in v0.0.858
func ToPipelineOutput(from tektonv1beta1.TaskResource) tektonv1beta1.PipelineTaskOutputResource
ToPipelineOutput converts the task resource into pipeline outputs
func ToPipelineOutputs ¶ added in v0.0.858
func ToPipelineOutputs(inputs []tektonv1beta1.TaskResource) []tektonv1beta1.PipelineTaskOutputResource
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
func ToPipelineWorkspaceDeclaration(from tektonv1beta1.WorkspaceDeclaration) tektonv1beta1.PipelineWorkspaceDeclaration
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
func ToWorkspaceBinding(from tektonv1beta1.WorkspaceDeclaration) tektonv1beta1.WorkspaceBinding
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