Documentation
¶
Index ¶
- func ComputeExecutionHash(spec *contractv1.BuildSpec, trigger domain.TriggerContext) (string, error)
- func CreateOrPatch(ctx context.Context, c client.Client, obj client.Object) error
- func ParseImage(image string) (string, string)
- func PointerBool(b bool) *bool
- func PrintRepoTree(basePath string) error
- func RunGit(dir string, args ...string) (string, error)
- func RunGitWithEnv(dir string, env []string, args ...string) (string, error)
- func ShortHash(hash string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeExecutionHash ¶
func ComputeExecutionHash( spec *contractv1.BuildSpec, trigger domain.TriggerContext, ) (string, error)
ComputeExecutionHash hashes a build's semantic intent so equivalent builds hash identically regardless of Kubernetes storage format or metadata.
func CreateOrPatch ¶
CreateOrPatch creates obj if it doesn't exist, or leaves it unchanged if it does — a thin wrapper around controllerutil.CreateOrUpdate with a no-op mutate func.
func ParseImage ¶
ParseImage splits an image reference on its last colon into repository and tag, defaulting to tag "latest" when no colon is present.
func PrintRepoTree ¶
PrintRepoTree prints an indented directory tree of basePath to stdout, for debugging what a cloned repository actually contains.
func RunGit ¶
RunGit runs a git command in dir (or the current directory if dir is empty) and returns its combined stdout/stderr output, trimmed.
func RunGitWithEnv ¶
RunGitWithEnv runs a git command with additional environment variables.
Types ¶
This section is empty.