bigkevmcd / tekton-polling-operator

A simple git repository poller.
Apache License 2.0
26 stars 12 forks source link

Support workspaces in Repository #5

Closed hnts closed 3 years ago

hnts commented 3 years ago

Hi there!

To use workspaces with PipelineRun, Repository CRD requires to support workspaces.

This PR implements a way to use workspaces in Repository CRD.

The following example uses workspaces.

apiVersion: polling.tekton.dev/v1alpha1
kind: Repository
metadata:
  name: demo-app-repository
  namespace: tekton-polling-operator
spec:
  url: https://github.com/bigkevmcd/tekton-polling-operator.git
  ref: main
  frequency: 5m
  type: github
  pipelineRef:
    name: ci-pipeline
    namespace: tekton-pipelines
    params:
    - name: gitRevision
      expression: commit.sha
    - name: repoURL
      expression: repoURL
    workspaces:
      - name: git-source
        persistentVolumeClaim:
          claimName: tekton-volume
bigkevmcd commented 3 years ago

Hi @hnts thanks for this, I've been holding off on adding functionality, because ultimately I want to support TriggerTemplates but that's been slow progress.

I'll take a look, and I'd like to get this landed.