Documentation
¶
Overview ¶
Package remotebuild runs read-only build commands in reusable, worktree-owned builder Jobs. Cluster names, images and credentials belong to desk configuration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Job ¶
Job gives each worktree/toolchain a warm workspace without cluster credentials. Exiting the watchdog lets the TTL controller delete both Job and pod.
Types ¶
type Cache ¶
type Cache struct {
Enabled bool `yaml:"enabled"`
Secret string `yaml:"secret"`
GoHelper string `yaml:"goHelper"`
GoPrefix string `yaml:"goPrefix"`
RustPrefix string `yaml:"rustPrefix"`
ReadOnly bool `yaml:"readOnly"`
}
Cache configures optional shared storage. Credentials and endpoints are projected from a namespace Secret; configuration and pod specs hold no values.
type Config ¶
type Config struct {
Enabled bool `yaml:"enabled"`
Kubeconfig string `yaml:"kubeconfig"`
Context string `yaml:"context"`
Namespace string `yaml:"namespace"`
Images map[string]string `yaml:"images"`
CPU string `yaml:"cpu"`
Memory string `yaml:"memory"`
MaxPods int `yaml:"maxPods"`
PlacementTimeout time.Duration `yaml:"placementTimeout"`
IdleTimeout time.Duration `yaml:"idleTimeout"`
Cache Cache `yaml:"cache"`
}
Config is opt-in; no Kubernetes call is made while Enabled is false.
type Record ¶ added in v0.174.0
type Record func(verb, detail string)
Record appends one of the run's events (runrecord.Start, End, Fallback) to the event log; nil records nothing. Like guard.Options.Record, it must not fail or block the run.
type Runner ¶
type Runner struct {
Config Config
StateDir string
Stdout, Stderr io.Writer
Command Command
// Record writes the run's events; nil records nothing.
Record Record
// Name is the command the run's records name (guard.CommandHead of the
// caller's argv); Repo and Head what it builds.
Name, Repo, Head string
// Tail keeps the remote run's streamed output for the failure record,
// exactly as the local scope's stream does; nil keeps nothing.
Tail io.Writer
// KeepFailure keeps the failed run's tail in the run record and
// prints it, named by the run's id, and answers the path it kept
// ("" when nothing was): the end record names it, as the local run's
// does. It is the caller's: the tail's size, masking and directory
// belong to `beekeeper run`, not to the transport.
KeepFailure func(runID string, exit int) string
}