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

Make it clear what kritis is #25

Merged
merged 2 commits into from
Sep 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 31 additions & 15 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have never tested this.
Have you?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep! hopefully soon we'll have CI that verifies they'll keep working (#15 + #16) but in the meantime I've run this manually and gotten them working (or at least they worked last week 🤞 )

[installing the CRDs and running the controller](../DEVELOPMENT.md#installing-andrunning)):
Expand All @@ -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:
Expand All @@ -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).
2 changes: 1 addition & 1 deletion examples/invocations/kritis-pipeline-run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"