Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatRecord ¶
FormatRecord describes the record in a human-readable manner for inclusion into build logs
Types ¶
type Command ¶
type Command struct { Command string `json:"command"` Output string `json:"output,omitempty"` Error string `json:"error,omitempty"` // Duration is the runtime for the command. Duration time.Duration `json:"duration,omitempty"` }
Command is a trace of a command executed while achieving the desired git state.
type Record ¶
type Record struct { Refs prowapi.Refs `json:"refs"` Commands []Command `json:"commands,omitempty"` Failed bool `json:"failed,omitempty"` // FinalSHA is the SHA from ultimate state of a cloned ref // This is used to populate RepoCommit in started.json properly FinalSHA string `json:"final_sha,omitempty"` // Duration is the total runtime for the clone. Duration time.Duration `json:"duration,omitempty"` }
Record is a trace of what the desired git state was, what steps we took to get there, what our final state ended up being, and whether or not we were successful.
func Run ¶
func Run(refs prowapi.Refs, dir, gitUserName, gitUserEmail, cookiePath string, env []string, userGenerator github.UserGenerator, tokenGenerator github.TokenGenerator) Record
Run clones the refs under the prescribed directory and optionally configures the git username and email in the repository as well.
Click to show internal directories.
Click to hide internal directories.