apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
  annotations:
    managed-by: Tekton
  name: operator-fetch-component-releases
spec:
  params:
  - name: components
    description: configuration file to reade
    default: components.yaml
    # TODO: Set default to nightly. Mar 09, 2022 - no nightly ("latest") releases available for Hub
  - name: TARGET_PLATFORMS
    description: Target platform for for which the payload is going to be used
    default: "kubernetes openshift"
  steps:
  - image: docker.io/library/golang:latest
    name: fetch-components
    workingDir: /go/src/github.com/tektoncd/operator
    script: |
      #!/usr/bin/env sh
      for platform in $(params.TARGET_PLATFORMS); do
        echo "Fetching Tekton components for ${platform} build"
        ./hack/fetch-releases.sh ${platform} ${params.components}
        [[ "$?" != 0 ]] &&  exit 1
        # print directory structure of cmd/<platform>/operator/kodata
        find cmd/${platform}/operator/kodata/
      done
    securityContext:
      runAsUser: 0
  workspaces:
  - mountPath: /go/src/github.com/tektoncd/operator
    name: source

apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
  annotations:
    managed-by: Tekton
  name: operator-fetch-component-releases
spec:
  params:
  - name: components
    description: configuration file to reade
    default: components.yaml
    # TODO: Set default to nightly. Mar 09, 2022 - no nightly ("latest") releases available for Hub
  - name: TARGET_PLATFORMS
    description: Target platform for for which the payload is going to be used
    default: "kubernetes openshift"
  steps:
  - image: docker.io/library/golang:latest
    name: fetch-components
    workingDir: /go/src/github.com/tektoncd/operator
    script: |
      #!/usr/bin/env bash
      for platform in $(params.TARGET_PLATFORMS); do
        echo "Fetching Tekton components for ${platform} build"
        ./hack/fetch-releases.sh ${platform} $(params.components)
        [[ "$?" != 0 ]] &&  exit 1
        # print directory structure of cmd/<platform>/operator/kodata
        find cmd/${platform}/operator/kodata/
      done
    securityContext:
      runAsUser: 0
  workspaces:
  - mountPath: /go/src/github.com/tektoncd/operator
    name: source

Fix expression in fetch component release task
Fix expression in fetch component release task
