Documentation
¶
Overview ¶
Package artifacts implements the business logic for fetching and downloading CircleCI job artifacts.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Download ¶
Download fetches each entry's artifact and writes it under dir, preserving the artifact's Path as the relative file path. When entries span multiple execution indices, each execution's artifacts are placed under a subdirectory named by the index (e.g. dir/exec-0000/path, dir/exec-0003/path).
func DownloadPaths ¶ added in v1.0.48340
DownloadPaths fetches each entry's artifact and writes it at dir/<Path>, applying no layout of its own — the caller has already put whatever structure it wants in each Path. Use it when the destination layout is decided elsewhere (the run-get artifact browser downloads exactly the paths it displayed, for any subset of a job's artifacts); use Download to have the per-execution grouping derived from the entries themselves.
func FormatMarkdown ¶
FormatMarkdown returns a markdown string listing the artifacts. When all entries share the same execution index the output is a flat list. When multiple executions are present, entries are grouped under ## Execution N headings.
Types ¶
type Client ¶
type Client interface {
GetJobArtifactsV3(ctx context.Context, jobID string) ([]apiclient.Artifact, error)
DownloadArtifact(ctx context.Context, artifactURL string, dst io.Writer) error
}
Client is the subset of apiclient.Client methods we need.