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 ¶
const GolangCILintModule = "github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.15.0"
GolangCILintModule is the golangci-lint a Go image without one gets for merge validation: the version the repository's CI pins.
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"`
Storage string `yaml:"storage"`
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 {
// Dir selects the source worktree without changing the coordinator process cwd.
// Empty preserves the caller's current working directory.
Dir string
// RequireRemote refuses unavailable execution instead of suggesting a local fallback.
RequireRemote bool
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
}
func (Runner) Sweep ¶
Sweep retires this machine's builders for missing or explicitly finished worktrees. Busy builders keep their journal and retry on the next sweep. It never lists or deletes another machine's jobs, or touches shared caches.