Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CleanupCmd ¶ added in v3.35.2
type CleanupCmd struct {
Pipeline string `` /* 129-byte string literal not displayed */
PreflightUUID string `help:"Target a single preflight branch by its UUID (bk/preflight/<uuid>)." name:"preflight-uuid"`
DryRun bool `help:"Show which branches would be deleted without actually deleting them." name:"dry-run"`
Text bool `help:"Use plain text output instead of interactive terminal UI." xor:"output"`
JSON bool `help:"Emit one JSON object per event (JSONL)." xor:"output"`
}
CleanupCmd deletes remote bk/preflight/* branches whose builds have completed.
func (*CleanupCmd) Help ¶ added in v3.35.2
func (c *CleanupCmd) Help() string
func (*CleanupCmd) Run ¶ added in v3.35.2
func (c *CleanupCmd) Run(kongCtx *kong.Context, globals cli.GlobalFlags) error
type Event ¶ added in v3.35.0
type Event struct {
Type EventType `json:"type"`
Time time.Time `json:"timestamp"`
PreflightID string `json:"preflight_id,omitempty"`
// Title is the primary status text shown in the TTY dynamic area.
Title string `json:"title,omitempty"`
// Detail is supplementary information printed to the scrollback log.
Detail string `json:"detail,omitempty"`
Pipeline string `json:"pipeline,omitempty"`
BuildNumber int `json:"build_number,omitempty"`
BuildURL string `json:"build_url,omitempty"`
BuildState string `json:"build_state,omitempty"`
// Incomplete is set for build_summary events when the CLI stops before a terminal build state.
Incomplete bool `json:"incomplete,omitempty"`
// StopReason describes why the summary was emitted early.
StopReason string `json:"stop_reason,omitempty"`
// BuildCanceled is set when the CLI attempted early-exit cleanup that cancels the remote build.
BuildCanceled *bool `json:"build_canceled,omitempty"`
Jobs *watch.JobSummary `json:"jobs,omitempty"`
// Job is set for job_failure and job_retry_passed events.
Job *buildkite.Job `json:"job,omitempty"`
// FailedJobs is set for build_summary events when the build failed. Contains hard-failed jobs only (soft failures excluded).
FailedJobs []buildkite.Job `json:"failed_jobs,omitempty"`
// PassedJobs is set for build_summary events when the build passed and has 10 or fewer jobs.
PassedJobs []buildkite.Job `json:"passed_jobs,omitempty"`
// Duration is set for build_summary events. Total elapsed time of the preflight run.
Duration time.Duration `json:"duration_ns,omitempty"`
// TestFailures is set for test_failure events.
TestFailures []buildkite.BuildTest `json:"test_failures,omitempty"`
// Tests is set for build_summary events when aggregated test summary data is available.
Tests internalpreflight.SummaryTests `json:"tests,omitempty"`
}
Event is the single data model emitted by a preflight run. Renderers project events differently by output mode (TTY, text, JSON).
func (*Event) ApplyJobResults ¶ added in v3.38.0
func (e *Event) ApplyJobResults(finalBuild buildkite.Build, tracker *watch.JobTracker)
func (*Event) ApplySummaryMeta ¶ added in v3.38.0
func (e *Event) ApplySummaryMeta(meta summaryMeta)
type EventType ¶ added in v3.35.0
type EventType string
EventType identifies the kind of preflight event.
type RunCmd ¶ added in v3.35.2
type RunCmd struct {
Pipeline string `help:"The pipeline to build. This can be a {pipeline slug} or in the format {org slug}/{pipeline slug}." short:"p"`
Watch bool `help:"Watch the build until completion." default:"true" negatable:""`
ExitOn []internalpreflight.ExitPolicy `` /* 179-byte string literal not displayed */
Interval float64 `help:"Polling interval in seconds when watching." default:"2"`
NoCleanup bool `` /* 126-byte string literal not displayed */
AwaitTestResults awaitTestResultsFlag `` /* 173-byte string literal not displayed */
Text bool `help:"Use plain text output instead of interactive terminal UI." xor:"output"`
JSON bool `help:"Emit one JSON object per event (JSONL)." xor:"output"`
}
Click to show internal directories.
Click to hide internal directories.