From f9d1b856cc7e418d1375a0b49f60dd49975442f3 Mon Sep 17 00:00:00 2001 From: Christie Wilson Date: Mon, 10 Sep 2018 09:33:43 -0700 Subject: [PATCH 1/2] Make it clear what `kritis` is One of the examples demonstrates building an arbitrary pipeline for a project called `kritis`, mostly b/c folks who are working on this project have also worked on `kritis` and are familiar with it, but it's not actually relevant to `bulid-pipeline` directly. Tried to make this more clear in the docs. Also in #2 we had a question about what `strawman` means (not the first time this has come up!) A defintion is avialable at https://en.wikipedia.org/wiki/Straw_man_proposal but also mentions it is "american business jargon" so if we want to go on using that term we should define it. Instead I removed it from the one place it exists in our docs. Since no one has completely beaten up the proposal yet it seems to be graduating beyond the "strawman" phase - but correct me if I'm wrong :D --- examples/README.md | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/examples/README.md b/examples/README.md index e85e72379d7..08fd2182f67 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,6 +1,6 @@ # Examples -This directory contains examples of [the Pipeline strawman CRDs](../README.md) in action. +This directory contains examples of [the Pipeline CRDs](../README.md) in action. To deploy them to your cluster (after [installing the CRDs and running the controller](../DEVELOPMENT.md#installing-andrunning)): @@ -11,6 +11,29 @@ kubectl apply -f examples/ kubectl apply -f examples/invocations ``` +## Example Pipelines + +We have 2 example [Pipelines](../README.md#pipeline) in [./pipelines](./pipelines) + +1. [The Kritis Pipline](./pipelines/kritis.yaml): This example builds a Pipeline for the + [kritis project](https://github.com/grafeas/kritis), and demonstrates how to configure + a pipeline which: + + 1. Runs unit tests + 2. Build an image + 3. Deploys it to a test environment + 4. Runs integration tests + + ![Pipeline Configuration](./pipelines/kritis-pipeline.png) + +2. [Guestbook](./pipelines/guestbook.yaml): This Pipeline is based on example application in + [the Kubernetes example Repo](https://github.com/kubernetes/examples/tree/master/guestbook) + This pipeline demonstartes how to integrate frontend + [guestbook app code](https://github.com/kubernetes/examples/tree/master/guestbook-go) with + backend [redis-docker image](https://github.com/GoogleCloudPlatform/redis-docker/tree/master/4) provided by GCP. + + ![Pipeline Configuration](./pipelines/guestbook-pipeline.png) + ## Example Tasks * Example [Tasks](../../README.md#task) are in: @@ -33,17 +56,4 @@ The [runs](./runs/) dir contains an example [TaskRun](../README.md#taskrun) and [run-kritis-test.yaml](./invocations/run-kritis-test.yaml) shows an example of how to manually run kritis unit test off your development branch. -[kritis-pipeline-run.yaml](./invocations/kritis-pipeline-run.yaml) shows an example of what it would look like to invoke the [kritis example pipeline](#example-pipelines) manually and have it fail on the second task (building and pushing the image). - -## Example Pipelines - -Finally, we have 2 example [Pipelines](../README.md#pipeline) in [./pipelines](./pipelines) - -1. [Kritis](./pipelines/kritis.yaml): This exmaple demonstrates how to configure a pipeline which runs unit test, build an image, deploys it to test and then run integration tests. (This is the pipeline for [kritis](https://github.com/grafeas/kritis).) - -![Pipeline Configuration](./pipelines/kritis-pipeline.png) - -2. [Guestbook](./pipelines/guestbook.yaml): This is pipeline which is based on example application in [Kubernetes example Repo](https://github.com/kubernetes/examples/tree/master/guestbook) -This pipeline demonstartes how to integrate frontend [guestbook app code](https://github.com/kubernetes/examples/tree/master/guestbook-go) with backed [redis-docker image](https://github.com/GoogleCloudPlatform/redis-docker/tree/master/4) provided by GCP. - -![Pipeline Configuration](./pipelines/guestbook-pipeline.png) +[kritis-pipeline-run.yaml](./invocations/kritis-pipeline-run.yaml) shows an example of what it would look like to invoke the [kritis example pipeline](#example-pipelines) manually and have it fail on the second task (building and pushing the image). \ No newline at end of file From f390c6ee6acf87e2356378571fdcd0069ccd0fe9 Mon Sep 17 00:00:00 2001 From: Christie Wilson Date: Mon, 10 Sep 2018 13:13:16 -0700 Subject: [PATCH 2/2] Make it more clear what the kritis pipeline example failure means --- examples/README.md | 8 +++++++- examples/invocations/kritis-pipeline-run.yaml | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/examples/README.md b/examples/README.md index 08fd2182f67..45e3e82c5c5 100644 --- a/examples/README.md +++ b/examples/README.md @@ -56,4 +56,10 @@ The [runs](./runs/) dir contains an example [TaskRun](../README.md#taskrun) and [run-kritis-test.yaml](./invocations/run-kritis-test.yaml) shows an example of how to manually run kritis unit test off your development branch. -[kritis-pipeline-run.yaml](./invocations/kritis-pipeline-run.yaml) shows an example of what it would look like to invoke the [kritis example pipeline](#example-pipelines) manually and have it fail on the second task (building and pushing the image). \ No newline at end of file +[kritis-pipeline-run.yaml](./invocations/kritis-pipeline-run.yaml) shows an example of +what it would look like to invoke the [kritis example pipeline](#example-pipelines) +manually. In the `conditions` field for type `Successful` you can see that the status +is `False`, which indicates that the Pipeline was not run successfully. The field +`message` contains a human readable error indicating that one of the `TaskRuns` failed. +This `condition` (and everything else in the `status` section) would be populated by the +controller as it realized the PipelineRun (i.e. ran the Pipeline). diff --git a/examples/invocations/kritis-pipeline-run.yaml b/examples/invocations/kritis-pipeline-run.yaml index bdc31dd4c6b..23584a58b94 100644 --- a/examples/invocations/kritis-pipeline-run.yaml +++ b/examples/invocations/kritis-pipeline-run.yaml @@ -40,4 +40,4 @@ status: status: "False" lastTransitionTime: "2018-10-04T13:25:39Z" reason: taskFailure - message: "TaskRun `push-kritis-12321312984` had non-zero exit code" + message: "TaskRun `build-push-kritis-12321312984` had non-zero exit code"