pipelinerun

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: Apache-2.0 Imports: 8 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

Overview

Package pipelinerun holds helpers shared by the `krci pipelinerun` verbs and `krci project build` (validation, shared column headers, key=value parsing, row and dry-run rendering).

Index

Constants

View Source
const (
	KindParameter = "parameter"
	KindLabel     = "label"
)

Kinds for ParseKeyValueList error messages.

View Source
const (
	DryRunFlagUsage = "Render the would-be PipelineRun without creating it " +
		"(YAML by default; -o json wraps it in the JSON envelope)"
	OutputFlagUsage = "Output format: table, json, yaml (yaml only with --dry-run, where it is the default)"
)

DryRunFlagUsage and OutputFlagUsage are the help texts for `--dry-run` and `-o` of `pipelinerun start` and `project build`.

View Source
const (
	LogsFlagUsage   = "Include pipeline run logs (none until the run finishes)"
	ReasonFlagUsage = "Show task tree and failure diagnosis (none until the run finishes)"
)

LogsFlagUsage and ReasonFlagUsage are the help texts for `--logs` and `--reason` of `pipelinerun list` and `pipelinerun get`.

View Source
const SchemaVersion = "1"

SchemaVersion is the JSON envelope schema tag for pipelinerun command output. Matches the per-group pattern used by sonar, sca, and discovery.

Variables

View Source
var Headers = []string{"NAME", "STATUS", "PROJECT", "PR", "AUTHOR", "TYPE", "STARTED", "DURATION"}

Headers is the shared column set for `pipelinerun list`, `pipelinerun start` and `project build`.

Functions

func HandleError added in v0.19.0

func HandleError(ios *iostreams.IOStreams, outputFormat string, err error) error

HandleError is cmdutil.HandleError with the envelope version of `pipelinerun start` and `project build`.

func ParseKeyValueList

func ParseKeyValueList(values []string, kind string) (map[string]string, error)

ParseKeyValueList parses a list of `--param key=value` (or `--label key=value`) strings into a map.

Rules:

  • Split on the first `=` only (so values containing `=` are preserved).
  • Trim surrounding whitespace from key and value.
  • Empty key after trim → error.
  • Duplicate keys → error (no last-wins).
  • Malformed entry (no `=`) → error.

kind is used in error messages and SHOULD be one of KindParameter or KindLabel.

func PresentResult

func PresentResult(ios *iostreams.IOStreams, format string, dryRun bool, result *portal.StartResult) error

PresentResult writes a start or build result: the dry-run manifest, the JSON envelope, or the table row followed by a stderr note that the controller may briefly 404 on the new run until its labels reconcile.

func ValidateOutputAndDryRun

func ValidateOutputAndDryRun(format string, dryRun bool) error

ValidateOutputAndDryRun enforces the joint contract between -o and --dry-run.

  • "", "table", "json" → ok (table only when not dry-run).
  • "yaml" → ok only when --dry-run is set.
  • --dry-run + "table" → rejected (no row to render for a manifest).
  • any other -o value → rejected as unknown.

Types

This section is empty.

Jump to

Keyboard shortcuts

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