Documentation ¶
Index ¶
- Variables
- func ExtractStepAndResultFromSidecarResultName(sidecarResultName string) (string, string, error)
- func GetResultsFromSidecarLogs(ctx context.Context, clientset kubernetes.Interface, namespace string, ...) ([]result.RunResult, error)
- func LookForArtifacts(w io.Writer, names []string, runDir string) error
- func LookForResults(w io.Writer, runDir string, resultsDir string, resultNames []string, ...) error
- type SidecarLogResult
- type SidecarLogResultType
Constants ¶
This section is empty.
Variables ¶
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
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
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