Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Pipelines support array of objects results #1154

Open
drewbailey opened this issue Jun 21, 2024 · 0 comments
Open

Proposal: Pipelines support array of objects results #1154

drewbailey opened this issue Jun 21, 2024 · 0 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@drewbailey
Copy link

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)    
@drewbailey drewbailey added the kind/feature Categorizes issue or PR as related to a new feature. label Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

1 participant