Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClonerUsingGitExec ¶
ClonerUsingGitExec uses a local git install, as opposed to say, some remote API, to obtain a local clone of a remote repo.
Types ¶
type Cloner ¶
Cloner is a function that can clone a git repo.
func DoNothingCloner ¶
func DoNothingCloner(dir filesys.ConfirmedDir) Cloner
DoNothingCloner returns a cloner that only sets cloneDir field in the repoSpec. It's assumed that the cloneDir is associated with some fake filesystem used in a test.
type RepoSpec ¶
type RepoSpec struct { // Host, e.g. https://github.com/ Host string // RepoPath name (Path to repository), // e.g. kubernetes-sigs/kustomize RepoPath string // Dir is where the repository is cloned to. Dir filesys.ConfirmedDir // Relative path in the repository, and in the cloneDir, // to a Kustomization. KustRootPath string // Branch or tag reference. Ref string // Submodules indicates whether or not to clone git submodules. Submodules bool // Timeout is the maximum duration allowed for execing git commands. Timeout time.Duration // contains filtered or unexported fields }
RepoSpec specifies a git repository and a branch and path therein.
func NewRepoSpecFromURL ¶ added in v0.11.5
NewRepoSpecFromURL parses git-like urls. From strings like git@github.com:someOrg/someRepo.git or https://github.com/someOrg/someRepo?ref=someHash, extract the different parts of URL, set into a RepoSpec object and return RepoSpec object. It MUST return an error if the input is not a git-like URL, as this is used by some code paths to distinguish between local and remote paths.
In particular, NewRepoSpecFromURL separates the URL used to clone the repo from the elements Kustomize uses for other purposes (e.g. query params that turn into args, and the path to the kustomization root within the repo).
func (*RepoSpec) CloneDir ¶
func (x *RepoSpec) CloneDir() filesys.ConfirmedDir