lighthouses

package
v0.1.36 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultPipelineCatalogSHA

func DefaultPipelineCatalogSHA(catalogSHA string)

DefaultPipelineCatalogSHA sets a default catalog SHA

func FindCatalogTaskSpec

func FindCatalogTaskSpec(resolver *inrepo.UsesResolver, sourceFile, defaultSHA string) (*v1beta1.TaskSpec, error)

FindCatalogTaskSpec finds the pipeline catalog TaskSpec

func FindCatalogTaskSpecFromURI

func FindCatalogTaskSpecFromURI(resolver *inrepo.UsesResolver, gitURI string) (*v1beta1.TaskSpec, error)

FindCatalogTaskSpecFromURI finds the catalog task spec from the given URI

func GetMandatoryTaskSpec

func GetMandatoryTaskSpec(pr *v1beta1.PipelineRun) (*v1beta1.TaskSpec, error)

GetMandatoryTaskSpec returns the mandatory first task spec in the given PipelineRun

func LazyCreateLHClient

func LazyCreateLHClient(client lhclient.Interface) (lhclient.Interface, error)

LazyCreateLHClient lazy creates the jx client if its not defined

func LoadEffectivePipelineRun

func LoadEffectivePipelineRun(resolver *inrepo.UsesResolver, path string) (*tektonv1beta1.PipelineRun, error)

LoadEffectivePipelineRun loads the effective pipeline run

Types

type ResolverOptions

type ResolverOptions struct {
	scmhelpers.Factory

	FileBrowser       filebrowser.Interface
	Dir               string
	CatalogOwner      string
	CatalogRepository string
	CatalogSHA        string
}

ResolverOptions the options to create a resolver

func (*ResolverOptions) AddFlags

func (o *ResolverOptions) AddFlags(cmd *cobra.Command)

AddFlags adds CLI flags

func (*ResolverOptions) CreateResolver

func (o *ResolverOptions) CreateResolver() (*inrepo.UsesResolver, error)

CreateResolver creates the resolver from the available options

type ScmProvider

type ScmProvider struct {
	ScmClient *scm.Client
	Ctx       context.Context
}

func NewScmProvider

func NewScmProvider(ctx context.Context, scmClient *scm.Client) *ScmProvider

NewScmProvider creates a new ScmProvider for working with lighthouse

func (*ScmProvider) GetFile

func (c *ScmProvider) GetFile(owner, repo, filepath, commit string) ([]byte, error)

GetFile returns the file from git

func (*ScmProvider) GetMainAndCurrentBranchRefs

func (c *ScmProvider) GetMainAndCurrentBranchRefs(owner, repo, eventRef string) ([]string, error)

GetMainAndCurrentBranchRefs find the main branch

func (*ScmProvider) GetRepositoryByFullName

func (c *ScmProvider) GetRepositoryByFullName(fullName string) (*scm.Repository, error)

ListFiles returns the files from git

func (*ScmProvider) ListFiles

func (c *ScmProvider) ListFiles(owner, repo, filepath, commit string) ([]*scm.FileEntry, error)

ListFiles returns the files from git

Jump to

Keyboard shortcuts

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