Documentation
¶
Overview ¶
run_artifact.go isolates artifact download and fetching logic.
This file contains downloadRunArtifacts which fetches run status and downloads referenced artifacts to disk. It generates deterministic filenames, streams bytes without in-memory buffering, and produces a manifest.json for artifact metadata. Artifact download is separated from execution flow to enable independent testing of HTTP fetching and retry.
run_list.go implements run listing CLI commands.
The command delegates to the internal/cli/migs list client because that client still owns the shared /v1/runs pagination call.
Command structure:
- ploy run ls [--limit N] [--offset N]
Index ¶
- func DownloadRunArtifacts(ctx context.Context, base *url.URL, httpClient *http.Client, runID, dir string, ...) error
- func NewCommand() *cobra.Command
- func RunApply(ctx context.Context, opts ApplyOptions) error
- func RunArtifactPull(ctx context.Context, opts ArtifactPullOptions) error
- func RunCancel(ctx context.Context, opts CancelOptions) error
- func RunList(ctx context.Context, opts ListOptions) error
- func RunRestart(ctx context.Context, opts RestartOptions) error
- func RunSBOM(ctx context.Context, opts SBOMOptions) error
- func RunStatus(ctx context.Context, opts StatusOptions) error
- func RunSubmit(ctx context.Context, opts SubmitOptions) error
- type ApplyOptions
- type ArtifactPullOptions
- type CancelOptions
- type ListOptions
- type RestartOptions
- type SBOMOptions
- type StatusOptions
- type SubmitOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadRunArtifacts ¶
func DownloadRunArtifacts(ctx context.Context, base *url.URL, httpClient *http.Client, runID, dir string, out io.Writer) error
downloadRunArtifacts fetches run status and downloads referenced artifacts into dir. It streams bytes to disk (no in‑memory buffering), produces deterministic filenames, and writes a manifest.json with stable, sorted entries for reproducible output.
func NewCommand ¶
NewCommand constructs the Cobra command tree for `ploy run`.
func RunArtifactPull ¶
func RunArtifactPull(ctx context.Context, opts ArtifactPullOptions) error
func RunList ¶
func RunList(ctx context.Context, opts ListOptions) error
RunList implements `ploy run ls [selector] [--limit N] [--offset N]`. It lists runs with pagination, optionally filtered by a resolved repo URL.
func RunRestart ¶
func RunRestart(ctx context.Context, opts RestartOptions) error
Types ¶
type ApplyOptions ¶
type ArtifactPullOptions ¶
type ListOptions ¶
type RestartOptions ¶
type StatusOptions ¶
type SubmitOptions ¶
type SubmitOptions struct {
SpecPath string
RepoSelector string
Follow bool
Apply bool
PullArtifacts bool
PullPath string
MaxRetries int
StepEnvOverrides map[string][]string
Output io.Writer
FollowOutput io.Writer
}
SubmitOptions contains Cobra-parsed options for `ploy run <spec-path> [repo]`.