job

package
v1.0.47331 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
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

func Get(ctx context.Context, client *apiclient.Client, idStr string, jsonOut bool) error

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 NewJobCmd

func NewJobCmd() *cobra.Command

NewJobCmd returns the "circleci job" command group.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL