run

package
v0.1.17 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 28 Imported by: 0

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

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

func NewCommand() *cobra.Command

NewCommand constructs the Cobra command tree for `ploy run`.

func RunApply

func RunApply(ctx context.Context, opts ApplyOptions) error

func RunArtifactPull

func RunArtifactPull(ctx context.Context, opts ArtifactPullOptions) error

func RunCancel

func RunCancel(ctx context.Context, opts CancelOptions) 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

func RunSBOM

func RunSBOM(ctx context.Context, opts SBOMOptions) error

func RunStatus

func RunStatus(ctx context.Context, opts StatusOptions) error

func RunSubmit

func RunSubmit(ctx context.Context, opts SubmitOptions) error

Types

type ApplyOptions

type ApplyOptions struct {
	RunID    string
	RepoPath string
	Force    bool
	Output   io.Writer
}

type ArtifactPullOptions

type ArtifactPullOptions struct {
	RunID         string
	ArtifactsPath string
	Output        io.Writer
}

type CancelOptions

type CancelOptions struct {
	RunID  string
	Reason string
	Output io.Writer
}

type ListOptions

type ListOptions struct {
	Limit        int
	Offset       int
	RepoSelector string
	All          bool
	Output       io.Writer
}

type RestartOptions

type RestartOptions struct {
	RunID       string
	GitLabToken string
	Output      io.Writer
}

type SBOMOptions

type SBOMOptions struct {
	View   string
	RunID  string
	Output io.Writer
}

type StatusOptions

type StatusOptions struct {
	RunID   string
	JSONOut bool
	Follow  bool
	Output  io.Writer
}

type SubmitOptions

type SubmitOptions struct {
	SpecPath     string
	RepoSelector string
	Follow       bool
	Apply        bool

	PullArtifacts bool
	PullPath      string

	MaxRetries int

	StepEnvOverrides map[string][]string
	BuildGateForced  buildGateForcedOverrides

	GitLabToken string

	Output       io.Writer
	FollowOutput io.Writer
}

SubmitOptions contains Cobra-parsed options for `ploy run <spec-path> [repo]`.

Jump to

Keyboard shortcuts

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