Open
Description
Feature request
Tekton results https://tekton.dev/docs/pipelines/tasks/#emitting-results supports simple string values, objects (flat maps) and arrays of strings.
There are use cases where supporting an array of objects would be a nice addition.
Use case
Consider a OCI Image Build & Publishing Task that generates and publishes multiple images. It would be ideal to not have to treat the object as an unstructured string.
kind: Task
apiVersion: tekton.dev/v1 # or tekton.dev/v1beta1
metadata:
name: write-array
annotations:
description: |
A simple task that writes array
spec:
results:
- name: array-object-results
type: array-object
description: The array object results
url:
type: string
digest:
type: string
steps:
- name: write-array
image: bash:latest
script: |
#!/usr/bin/env bash
echo -n "[\{\"url\":\"abc.dev/sampler\",\"digest\":\"19f02276bf8dbdd62f069b922f10c65262cc34b710eea26ff928129a736be791\"}, {\"url\":\"abc.dev/sample2\",\"digest\":\"some-other-digest\"}\"]"| tee $(results.array-object-results.path)