kind: Pipeline
apiVersion: tekton.dev/v1
metadata:
  name: push-release-snapshot
spec:
  description: Push all builds in a Snapshot to the release repos.
  params:
  - name: SNAPSHOT
    description: Information about the components to release.
  - name: repo-prefix
    description: The prefix (usually hostname/orgname) of the destination repo where the Snapshot components will be pushed
    default: quay.io/ramalama
  - name: skip-components
    description: A space-separated list of components that should not be pushed
    default: bats e2e
  - name: git-url
    description: URL of the Git repository containing pipeline and task definitions
    default: https://github.com/containers/ramalama.git
  - name: git-revision
    description: Revision of the Git repository containing pipeline and task definitions
    default: main
  results:
  - name: TEST_OUTPUT
    description: Test results in JSON format
    value: $(tasks.push.results.TEST_OUTPUT)
  tasks:
  - name: push
    params:
    - name: SNAPSHOT
      value: $(params.SNAPSHOT)
    - name: repo-prefix
      value: $(params.repo-prefix)
    - name: skip-components
      value: $(params.skip-components)
    taskRef:
      resolver: git
      params:
      - name: url
        value: $(params.git-url)
      - name: revision
        value: $(params.git-revision)
      - name: pathInRepo
        value: .tekton/release/tasks/push-snapshot.yaml
