Documentation
¶
Index ¶
- Constants
- func Get(ctx context.Context, client *apiclient.Client, idStr string, jsonOut bool) error
- func NewJobCmd() *cobra.Command
- func OutputGet(ctx context.Context, client *apiclient.Client, jobID uuid.UUID, ...) error
- func OutputList(ctx context.Context, client *apiclient.Client, jobID uuid.UUID, ...) error
- func OutputListMarkdown(ctx context.Context, client *apiclient.Client, jobID uuid.UUID, ...) (string, error)
- func SummaryMarkdown(ctx context.Context, client *apiclient.Client, jobID uuid.UUID) (string, error)
Constants ¶
const DefaultStepOutputTail = 200
DefaultStepOutputTail is the default for --tail: how many lines of each step's output are embedded in the human-readable markdown. The markdown is rendered through glamour, whose cost (syntax tokenizing + reflow) is superlinear and grinds to a halt on a step with hundreds of thousands of lines. We keep the tail — the end of a log is where failures and final state are — and point at "job output get" for the rest. The --json output is never truncated; it always carries full output.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
Get renders a job's details exactly as "circleci job get" does. It is exported so interactive callers (e.g. "circleci run get") can reuse the same output without duplicating the formatting code.
func OutputGet ¶
func OutputGet(ctx context.Context, client *apiclient.Client, jobID uuid.UUID, execution, stepNum int, strip bool) error
OutputGet renders a job step's stdout/stderr exactly as "circleci job output get" does. It is exported so interactive callers (e.g. "circleci run get") can reuse the same output without duplicating the fetch/render logic.
func OutputList ¶
func OutputList(ctx context.Context, client *apiclient.Client, jobID uuid.UUID, execution, tail int, jsonOut bool) error
OutputList renders a job's steps with their output exactly as "circleci job output list" does. It is exported so interactive callers (e.g. "circleci run get") can reuse the same full report without duplicating the fetch/render logic. tail bounds how many lines of each step are shown in the rendered view (0 for all); DefaultStepOutputTail is the command's default.
func OutputListMarkdown ¶
func OutputListMarkdown(ctx context.Context, client *apiclient.Client, jobID uuid.UUID, execution, tail int) (string, error)
OutputListMarkdown fetches one execution's step output and returns it as markdown (the same content printOutputList pages), for the interactive run-get flow's in-flow "full job report" pager.
func SummaryMarkdown ¶
func SummaryMarkdown(ctx context.Context, client *apiclient.Client, jobID uuid.UUID) (string, error)
SummaryMarkdown assembles the job report as markdown, for the interactive run-get flow's in-flow "job report" pager (the RenderJobSummary callback). It mirrors runGet's non-JSON path but returns the markdown rather than paging it.
Types ¶
This section is empty.