Documentation
¶
Overview ¶
Package bundlechecks decides whether the external checks reported against a release bundle satisfy the checks a promotion stage requires.
Index ¶
Constants ¶
const ( // MaxNameLen bounds a check name (bundle_checks.name is varchar(64)). MaxNameLen = 64 // MaxPerStage bounds the checks one pipeline stage may require. MaxPerStage = 20 // MaxSummaryLen bounds the summary of a report. MaxSummaryLen = 2000 // MaxURLLen bounds the details URL of a report. MaxURLLen = 2048 )
Variables ¶
This section is empty.
Functions ¶
func ValidStatus ¶
func ValidStatus(s models.BundleCheckStatus) bool
ValidStatus reports whether s is a status a check can report.
func ValidateName ¶
ValidateName returns a client-facing message when name cannot name a check: it must be non-empty, trimmed, at most MaxNameLen bytes and free of control characters. The empty string means valid.
func ValidateRequired ¶
ValidateRequired returns a client-facing message when the required check names of one stage are invalid: too many, a bad name or a duplicate. The empty string means valid.
Types ¶
type Verdict ¶
type Verdict struct {
// Missing were never reported.
Missing []string
// Failed last reported failure or error.
Failed []string
// Pending last reported pending.
Pending []string
// Expired last reported success, but that success has run out.
Expired []string
}
Verdict is the outcome of Evaluate: the required checks that do not let the promotion through, by reason. Every list is in the order of the required names.
func Evaluate ¶
Evaluate judges the reported checks against the required names at now. A success counts only while its expiry (when it has one) lies in the future; duplicate required names are judged once.