Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Tekton "Bundles" stored in Git repos #3490

Closed
bobcatfish opened this issue Nov 3, 2020 · 3 comments
Closed

Support Tekton "Bundles" stored in Git repos #3490

bobcatfish opened this issue Nov 3, 2020 · 3 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@bobcatfish
Copy link
Collaborator

Feature request

Via #1839 we now support referencing versioned Tasks and Pipelines in OCI registries (https://github.com/tektoncd/pipeline/blob/master/docs/pipelines.md#tekton-bundles).

As highlighted in @ImJasonH 's early design doc this opens up the possibility to refer to Tekton resources (bundles?) in other locations as well, specifically in this issue I'd like to request/propose we add support for referencing Tasks and Pipelines in git, e.g. something like:

apiVersion: tekton.dev/v1alpha1
kind: TaskRun
metadata:
  name: my-task-run
spec:
  taskRef:
    git:
      url: https://github.com/my/repo
      commit: deadbeef
      path: path/to/my/task.yaml

Use case

  • I would like to set up a triggering system that uses my git repo as the source of truth for my Pipelines and Tasks, so that they can be versioned alongside my code, and so that I can make changes to these Pipelines and Tasks in my PRs that are picked up and used by CI

For example I could make a TriggerTemplate like:

apiVersion: triggers.tekton.dev/v1alpha1
kind: TriggerTemplate
metadata:
  name: run-tests
spec:
  params:
  - name: commitish
    description: The commitish to grab the Pipeline from to run
    default: master
  resourcetemplates:
  - apiVersion: tekton.dev/v1beta1
    kind: PipelineRun
    metadata:
      generateName: run-tests-$(uid)-
    spec:
      pipelineRef:
        git:
          url: https://github.com/my/repo
          # This would let me include any changes to the Pipeline in the PR testing
          commit: $(params.commitish)
          path: path/to/my/pipeline.yaml

Additional info

  • We'll have to figure out how to provide credentials for this as well
  • We've been talking about whether or not our git-init cmd binary continues to live in this project ( + @sbwsg ), if we want git support in the Tekton Pipelines controller I wonder if it might stick around after all
@bobcatfish bobcatfish added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 3, 2020
@vdemeester
Copy link
Member

"Support Tekton "Bundles" stored in Git repos" should probably renamed to "Support TaskRef/PipelineRef to refer to Git repos" instead 😉

@vdemeester
Copy link
Member

@bobcatfish Which then is a duplicates from #2298 😝

@bobcatfish
Copy link
Collaborator Author

hahaha that's how much I like this feature!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants