Skip to content

Commit

Permalink
Only have one set of examples and test that they are valid
Browse files Browse the repository at this point in the history
We ended up in a state where we had both an `examples` dir and a
`samples` dir, and neither were tested, so both were slightly out of
sync with each other and the actual types.

This was b/c:
- When we used kubebuilder, we generated our types from an original set
  of examples - previously these were in `config/samples` and they ended
  up in `samples`. We used the validation tests generated by kubebuilder
  to test these, but when we removed kubebuilder we removed the tests
- Before presenting the API to the Build CRD working group, we wanted to
  have some more complex, real world examples, which @tejal29 created
  from the `kritis` project and the k8s guestbook example

This commit makes sure that all of the functionality demonstrated in
`samples` is in `examples`, and removes `samples`. This included:
- Fixing `passedConstraints` to be plural as the types expected
- Including references to the `PipelineParams` in the `TaskRun` example
  (removing the duplicated list of result endpoints, since we'll be
  getting this from the references instead)
- Fixing clusterBindings to refer to the actual names of the clusters
  involved

It also adds a step to the integration tests to deploy the examples,
which will fail if they do not match the expected schema. At this point
they are torn down immediately after creation, but in #108 we can expand
this to actually test that they are working.

Also had to make some tweaks to the types:
- actually including `ClusterBindings` in the `Pipeline`
- Using names which include `Resource` instead of `Source`, which we
  moved away from in #39

Fixes #20
  • Loading branch information
bobcatfish authored and knative-prow-robot committed Oct 9, 2018
1 parent cb1221a commit 71b7abc
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 247 deletions.
12 changes: 0 additions & 12 deletions samples/README.md

This file was deleted.

68 changes: 0 additions & 68 deletions samples/pipeline_v1alpha1_pipeline.yaml

This file was deleted.

27 changes: 0 additions & 27 deletions samples/pipeline_v1alpha1_pipelineparams.yaml

This file was deleted.

34 changes: 0 additions & 34 deletions samples/pipeline_v1alpha1_pipelinerun.yaml

This file was deleted.

23 changes: 0 additions & 23 deletions samples/pipeline_v1alpha1_resources.yaml

This file was deleted.

24 changes: 0 additions & 24 deletions samples/pipeline_v1alpha1_task.yaml

This file was deleted.

59 changes: 0 additions & 59 deletions samples/pipeline_v1alpha1_taskrun.yaml

This file was deleted.

0 comments on commit 71b7abc

Please sign in to comment.