artifact

package
v3.67.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllowedStates = []string{"new", "finished", "error", "deleted", "expired"}

AllowedStates is the closed set of artifact states the Buildkite API accepts as the state filter. Exposed so callers can reference the same list in help text and up-front validation.

See https://buildkite.com/docs/apis/rest-api/artifacts#list-artifacts-for-a-build

Functions

func ArtifactSummary

func ArtifactSummary(artifact *buildkite.Artifact) string

ArtifactSummary renders a summary of a build artifact

func DownloadToFile added in v3.55.0

func DownloadToFile(ctx context.Context, client *buildkite.Client, url, destPath string) error

DownloadToFile creates destPath (including any missing parent directories) and streams the artifact at url into it.

func FormatBytes

func FormatBytes(bytes int64) string

FormatBytes formats bytes into human-readable format (KB, MB, GB, etc.)

func IsDownload added in v3.65.0

func IsDownload(ctx context.Context) bool

IsDownload reports whether ctx belongs to an artifact payload request. HTTP redirects preserve this context, so debug logging can omit payload bodies without relying on their URL or content type.

func List added in v3.55.0

func List(ctx context.Context, client *buildkite.Client, org, pipeline, build, jobUUID string, paths []string, state string) ([]buildkite.Artifact, error)

List fetches all artifacts for a build, or for a specific job when jobUUID is non-empty, paginating through all results.

paths and state are optional server-side filters. Paths are queried separately and results are deduplicated by artifact ID, preserving first-seen order. Wildcard matching is left to the API. state is validated and lower-cased.

func ValidateState added in v3.55.0

func ValidateState(state string) error

ValidateState rejects state values the Buildkite API won't accept, so a typo like "finshed" surfaces as a validation error instead of silently returning zero artifacts.

An empty string is treated as "no filter" and always accepted. Comparison is case-insensitive so callers can pass user input verbatim.

Types

This section is empty.

Jump to

Keyboard shortcuts

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