8000 Proposal: Pipelines support array of objects results · Issue #1154 · tektoncd/community · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Proposal: Pipelines support array of objects results #1154
Open
@drewbailey

Description

@drewbailey

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)    

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0