Pipeline: Split examples out to a new repo

Created on 21 Mar 2019  ·  11Comments  ·  Source: tektoncd/pipeline

This is a proposal to move examples to a separate repo. Currently we have examples in this repo, but this might lead to a few issues eventually:

  • We want lots of examples, without bogging down the submit queue for tektoncd/pipeline itself
  • We want some notion of "supported, maintained" tasks/pipelines that can be used directly
  • We want the community to help curate these

Some ideas to think through:

  • How can we test the examples continuously?
  • How can we update them with API changes?
kinquestion

Most helpful comment

@dlorenc I'm very much for a à-la-build-template repository that would hold Task and Pipeline definitions (and some associate run to test them).

On tests, additionally, if we setup some CI on this repository, we would need some daily build with current release and/or current master :dancer:

On updating them with API changes, it's gonna be a good exercise for us (to hopefully not break them often and later on to have clear upgrade path)

All 11 comments

Ref #567
Ref #568
Ref #558
Ref #535
Ref #536
Ref #530

cc @bobcatfish any other concerns to think through here?

Strawman for tests:

Each example pipeline/task must also specify a Pod yaml file in the same directory. We'll have a runner that creates that Pod in the same cluster the example ran in and validates that it worked correctly. Exit code of 0 means pass, anything else is failure.

Our test runner then goes:

  1. kubectl create -f example.yaml
  2. Wait for the resource to complete
  3. Create the test
  4. Wait for the test to complete

@dlorenc I'm very much for a à-la-build-template repository that would hold Task and Pipeline definitions (and some associate run to test them).

On tests, additionally, if we setup some CI on this repository, we would need some daily build with current release and/or current master :dancer:

On updating them with API changes, it's gonna be a good exercise for us (to hopefully not break them often and later on to have clear upgrade path)

I like the idea of a separate repo.

I think we'll need to have some type of cross-testing: we could run the examples against API changes as part of the pipeline repo CI, so that we can detect if a change breaks any example. To begin with such tests could be informative only; once the APIs are declared as stable they might even be made blocking.

This brings two benefits: keep the examples in a working state, help notice API breaking changes that might be missed by review.

Now that we've got https://github.com/tektoncd/catalog can we close this @dlorenc ? (or we could leave it open assuming we want to move our examples dir to that repo - but im not sure that's a given 🤔 )

examples are used as tests too in this repository, so maybe we want to rename the folder to make it more clear ?

examples are used as tests too in this repository, so maybe we want to rename the folder to make it more clear ?

hm interesting idea @vdemeester ! i'm having trouble thinking of any other names - I wouldn't want to move these to test since we do probably want to be able to point ppl at these as extensive examples of how Tasks and Pipelines work in general (unless we don't want users to look at these anymore?) :thinking:

Do you have any ideas? :ok_woman:

No clear ideas yet. There will be the catalog for a extensive examples of each task but we still need executable examples here (to catch potential regression, etc.). examples is fine for now :angel:

@dlorenc @bobcatfish what should we do for this ? We will have more example on the docs for sure, and we have the catalog for the shareable tasks.

/kind question

I feel like we should close this? Maybe open another issue to discuss anything specific that came from this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

silverlyra picture silverlyra  ·  4Comments

andydude picture andydude  ·  3Comments

pritidesai picture pritidesai  ·  4Comments

vdemeester picture vdemeester  ·  3Comments

nader-ziada picture nader-ziada  ·  4Comments