Example
How It Works
Declare Results
The task declares two results in the
results section, each with a name and description. This tells Tekton to create files where result values can be written.Write to Result Files
Each step writes its output to a result file using
$(results.NAME.path). The tee command both prints the output and writes it to the result file.Writing Results
To write a result value:tee to both display and write:
Result values must be plain text strings. Tekton will trim any trailing newlines from result values.
Expected Output
The task will output something like:Key Concepts
- Results: Named output values from a task
- Result Path: Use
$(results.NAME.path)to get the file path where the result should be written - Result Size: Results have a maximum size (typically 4KB for string results)
- Result Usage: Results can be passed to other tasks in a pipeline using
$(tasks.TASK_NAME.results.RESULT_NAME)
Next Steps
- See how to use results in pipelines
- Learn about passing results between tasks