gitresolver

package
v1.3.890 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2019 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateResolver

func CreateResolver(packsDir string, gitter gits.Gitter) (jenkinsfile.ImportFileResolver, error)

CreateResolver creates a new module resolver

func InitBuildPack

func InitBuildPack(gitter gits.Gitter, packURL string, packRef string) (string, error)

InitBuildPack initialises the build pack URL and git ref returning the packs dir or an error

func LoadModules

func LoadModules(dir string) (*jenkinsfile.Modules, error)

LoadModules loads the modules in the given build pack directory if there are any

Types

type ModuleResolver

type ModuleResolver struct {
	Module   *jenkinsfile.Module
	PacksDir string
}

ModuleResolver a resolver for a single module

func Resolve

func Resolve(m *jenkinsfile.Module, gitter gits.Gitter) (*ModuleResolver, error)

Resolve resolves this module to a directory

type ModulesResolver

type ModulesResolver struct {
	Modules map[string]*ModuleResolver
}

ModulesResolver resolves a number of modules into a structure we can use to resolve imports

func ResolveModules

func ResolveModules(m *jenkinsfile.Modules, gitter gits.Gitter) (*ModulesResolver, error)

ResolveModules Resolve the modules into a module resolver

func (*ModulesResolver) AsImportResolver

func (m *ModulesResolver) AsImportResolver() jenkinsfile.ImportFileResolver

AsImportResolver returns an ImportFileResolver for these modules

func (*ModulesResolver) ResolveImport

func (m *ModulesResolver) ResolveImport(importFile *jenkinsfile.ImportFile) (string, error)

ResolveImport resolves an import relative to the local git clone of the import

Jump to

Keyboard shortcuts

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