diff --git a/examples/README.md b/examples/README.md index e85e72379d7..45e3e82c5c5 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,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). - -## 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. 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"