Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrSecretNotFound = errors.New("Secret not found")
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct { *git.Repository // contains filtered or unexported fields }
func Git ¶
func Git(ctx context.Context, opts RepositoryOpts) (*Repository, error)
Git returns a fully configured Repository that can be used to build an image. If the repository is private, the proper credentials needs to be included as part of RepositoryOpts.
The Repository will be checked out using the Reference passed in the RepositoryOpts
func (*Repository) BuildContext ¶
func (r *Repository) BuildContext() string
BuildContext return the absolute path to the context set by the user.
func (*Repository) Dockerfile ¶
func (r *Repository) Dockerfile() string
func (*Repository) Path ¶
func (r *Repository) Path() string
Path returns the temporary path where the repository was cloned.
func (*Repository) Ref ¶
func (r *Repository) Ref() (string, error)
Ref returns the git reference(https://git-scm.com/book/en/v2/Git-Internals-Git-References) that was used to clone this repository. It is unlikely that a valid cloned repo returns an error here as it's asking for the Head, which will point at the reference used, but if it does happen, it means the repository is in an unknown state and can't be used to generate an image