Documentation ¶
Index ¶
- func DefaultPipelineCatalogSHA(catalogSHA string)
- func FindCatalogTaskSpec(resolver *inrepo.UsesResolver, sourceFile, defaultSHA string) (*v1beta1.TaskSpec, error)
- func FindCatalogTaskSpecFromURI(resolver *inrepo.UsesResolver, gitURI string) (*v1beta1.TaskSpec, error)
- func GetMandatoryTaskSpec(pr *v1beta1.PipelineRun) (*v1beta1.TaskSpec, error)
- func LazyCreateLHClient(client lhclient.Interface) (lhclient.Interface, error)
- func LoadEffectivePipelineRun(resolver *inrepo.UsesResolver, path string) (*tektonv1beta1.PipelineRun, error)
- type ResolverOptions
- type ScmProvider
- func (c *ScmProvider) GetFile(owner, repo, filepath, commit string) ([]byte, error)
- func (c *ScmProvider) GetMainAndCurrentBranchRefs(owner, repo, eventRef string) ([]string, error)
- func (c *ScmProvider) GetRepositoryByFullName(fullName string) (*scm.Repository, error)
- func (c *ScmProvider) ListFiles(owner, repo, filepath, commit string) ([]*scm.FileEntry, error)
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 ¶
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 ¶
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