Documentation
¶
Index ¶
- Constants
- func ConfigureLogging(c *cli.Command)
- func LogPrettifier(f *runtime.Frame) (string, string)
- func SummaryOutputDir(repoRootDir string) string
- func WithLogging(before cli.BeforeFunc) cli.BeforeFunc
- func WithSummary(step string, action SummaryAction) cli.ActionFunc
- func WriteSummary(baseDir, key, step string, s StepSummary) error
- type StepSummary
- type SummaryAction
Constants ¶
const ReleaseDir = "hack/release"
ReleaseDir is the path to the release directory base relative to the repo root.
Variables ¶
This section is empty.
Functions ¶
func ConfigureLogging ¶
ConfigureLogging sets up logging to both stdout and a file.
func LogPrettifier ¶
LogPrettifier formats logrus caller information as "pkg.Func():file:line".
func SummaryOutputDir ¶
SummaryOutputDir returns the base output directory for step summaries.
func WithLogging ¶
func WithLogging(before cli.BeforeFunc) cli.BeforeFunc
WithLogging wraps a cli.BeforeFunc with automatic log file configuration derived from the command's full name (e.g. "release branch" -> "release-branch.log").
func WithSummary ¶
func WithSummary(step string, action SummaryAction) cli.ActionFunc
WithSummary wraps a SummaryAction with timing, status, and summary file emission.
func WriteSummary ¶
func WriteSummary(baseDir, key, step string, s StepSummary) error
WriteSummary writes a summary YAML file to <baseDir>/summary/<key>/<step>.yaml. key is a release version or stream identifier; step is the step name.
Types ¶
type StepSummary ¶
type StepSummary struct {
Status string `yaml:"status"`
Started time.Time `yaml:"started"`
Completed time.Time `yaml:"completed"`
Outputs map[string]any `yaml:"outputs,omitempty"`
}
StepSummary represents structured output for a release step. Written to <repoRoot>/hack/release/_output/summary/<key>/<step>.yaml, where <key> is a release version (e.g. v1.36.0) for release-* steps or a stream identifier (e.g. v1.36) for branch-* steps.