sidecarlogresults

package
v0.62.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSizeExceeded = errors.New("results size exceeds configured limit")
)

ErrSizeExceeded indicates that the result exceeded its maximum allowed size

Functions

func ExtractStepAndResultFromSidecarResultName added in v0.54.0

func ExtractStepAndResultFromSidecarResultName(sidecarResultName string) (string, string, error)

ExtractStepAndResultFromSidecarResultName splits the result name to extract the step and result name from it. It only works if the format is <stepName>.<resultName>

func GetResultsFromSidecarLogs

func GetResultsFromSidecarLogs(ctx context.Context, clientset kubernetes.Interface, namespace string, name string, container string, podPhase corev1.PodPhase) ([]result.RunResult, error)

GetResultsFromSidecarLogs extracts results from the logs of the results sidecar

func LookForArtifacts added in v0.60.0

func LookForArtifacts(w io.Writer, names []string, runDir string) error

LookForArtifacts searches for and processes artifacts within a specified run directory. It looks for "provenance.json" files within the "artifacts" subdirectory of each named step. If the provenance file exists, the function extracts artifact information, formats it into a JSON string, and encodes it for output alongside relevant metadata (step name, artifact type).

func LookForResults

func LookForResults(w io.Writer, runDir string, resultsDir string, resultNames []string, stepResultsDir string, stepResults map[string][]string) error

LookForResults waits for results to be written out by the steps in their results path and prints them in a structured way to its stdout so that the reconciler can parse those logs.

Types

type SidecarLogResult

type SidecarLogResult struct {
	Name  string               `json:"name"`
	Value string               `json:"value"`
	Type  SidecarLogResultType `json:"type"`
}

SidecarLogResult holds fields for storing extracted results

type SidecarLogResultType added in v0.54.0

type SidecarLogResultType string

Jump to

Keyboard shortcuts

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