apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
  name: buildah-pr-test-for-csi
spec:
  workspaces:
    - name: shared-workspace
      volumeClaimTemplate:
        spec:
          accessModes:
            - ReadWriteOnce
          resources:
            requests:
              storage: 1Gi
    - name: rhel-entitlement
      csi:
        readOnly: true
        driver: csi.sharedresource.openshift.io
        volumeAttributes:
          sharedSecret: my-share
  pipelineSpec:
    workspaces:
      - name: shared-workspace
      - name: rhel-entitlement
    tasks:
      - name: fetch-repository
        taskRef:
          name: git-clone
          kind: ClusterTask
        workspaces:
          - name: output
            workspace: shared-workspace
        params:
          - name: url
            value: https://github.com/savitaashture/articleyamls
      - name: buildah
        taskRef:
          name: buildah
          kind: ClusterTask
        runAfter:
          - fetch-repository
        workspaces:
          - name: source
            workspace: shared-workspace
          - name: rhel-entitlement
            workspace: rhel-entitlement
        params:
          - name: IMAGE
            value: image-registry.openshift-image-registry.svc:5000/$(context.pipelineRun.namespace)/articleyaml-csi
