result

package
v0.62.2 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 3 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResultType

type ResultType int

ResultType used to find out whether a RunResult is from a task result or not Note that ResultsType is another type which is used to define the data type (e.g. string, array, etc) we used for Results

const (
	// TaskRunResultType default task run result value
	TaskRunResultType ResultType = 1

	// InternalTektonResultType default internal tekton result value
	InternalTektonResultType = 3
	// UnknownResultType default unknown result type value
	UnknownResultType = 10
	// StepResultType default step result value
	StepResultType ResultType = 4

	// StepArtifactsResultType default step artifacts result value
	StepArtifactsResultType ResultType = 5

	// TaskRunArtifactsResultType default taskRun artifacts result value
	TaskRunArtifactsResultType ResultType = 6
)

func (*ResultType) UnmarshalJSON

func (r *ResultType) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals either an int or a string into a ResultType. String ResultTypes were removed because they made JSON messages bigger, which in turn limited the amount of space in termination messages for task results. String support is maintained for backwards compatibility - the Pipelines controller could be stopped midway through TaskRun execution, updated with support for int in place of string, and then fail the running TaskRun because it doesn't know how to interpret the string value that the TaskRun's entrypoint will emit when it completes.

type RunResult

type RunResult struct {
	Key   string `json:"key"`
	Value string `json:"value"`
	// ResourceName may be used in tests, but it is not populated in termination messages.
	// It is preserved here for backwards compatibility and will not be ported to v1.
	ResourceName string     `json:"resourceName,omitempty"`
	ResultType   ResultType `json:"type,omitempty"`
}

RunResult is used to write key/value pairs to TaskRun pod termination messages. The key/value pairs may come from the entrypoint binary, or represent a TaskRunResult. If they represent a TaskRunResult, the key is the name of the result and the value is the JSON-serialized value of the result.

Jump to

Keyboard shortcuts

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