Documentation ¶
Index ¶
Constants ¶
const DockerfileMetaTarget = "@dockerfile"
DockerfileMetaTarget is a target name which signals the resolver that the build file is a dockerfile. The DockerfileMetaTarget is really not a valid Earthly target otherwise.
const EarthIgnoreFile = ".earthignore"
EarthIgnoreFile is the name of the earthly ignore file.
Variables ¶
var ErrNoMatch = fmt.Errorf("no git match found")
ErrNoMatch occurs when no git matcher is found
var ImplicitExcludes = []string{ ".tmp-earthly-out/", "build.earth", "Earthfile", EarthIgnoreFile, }
ImplicitExcludes is a list of implicit patterns to exclude.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct { // BuildFilePath is the local path where the Earthfile or Dockerfile can be found. BuildFilePath string // BuildContext is the state to use for the build. BuildContext llb.State // GitMetadata contains git metadata information. GitMetadata *gitutil.GitMetadata // Target is the earthly target. Target domain.Target // LocalDirs is the local dirs map to be passed as part of the buildkit solve. LocalDirs map[string]string }
Data represents a resolved target's build context data.
type GitLookup ¶ added in v0.4.0
type GitLookup struct {
// contains filtered or unexported fields
}
GitLookup looksup gits
func NewGitLookup ¶ added in v0.4.0
func NewGitLookup() *GitLookup
NewGitLookup creates new lookuper
func (*GitLookup) AddMatcher ¶ added in v0.4.0
func (gl *GitLookup) AddMatcher(name, pattern, sub, user, password, suffix, protocol, keyScan string) error
AddMatcher adds a new matcher for looking up git repos
func (*GitLookup) DisableSSH ¶ added in v0.4.0
func (gl *GitLookup) DisableSSH()
DisableSSH changes all git matchers from ssh to https
func (*GitLookup) GetCloneURL ¶ added in v0.4.0
GetCloneURL returns the repo to clone, and a path relative to the repo
"github.com/earthly/earthly" ---> ("git@github.com/earthly/earthly.git", "") "github.com/earthly/earthly/examples" ---> ("git@github.com/earthly/earthly.git", "examples") "github.com/earthly/earthly/examples/go" ---> ("git@github.com/earthly/earthly.git", "examples/go")
Additionally a ssh keyscan might be returned (or an empty string indicating none was configured)
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver is a build context resolver.
func NewResolver ¶
func NewResolver(sessionID string, cleanCollection *cleanup.Collection, gitLookup *GitLookup) *Resolver
NewResolver returns a new NewResolver.