This directory contains examples of the Pipeline CRDs in action.
To deploy them to your cluster (after installing the CRDs and running the controller):
kubectl apply -f examples/pipelines
kubectl apply -f examples/
kubectl apply -f examples/invocations
We have 2 example Pipelines in ./pipelines
-
The Kritis Pipline: This example builds a Pipeline for the kritis project, and demonstrates how to configure a pipeline which:
- Runs unit tests
- Build an image
- Deploys it to a test environment
- Runs integration tests
-
Guestbook: This Pipeline is based on example application in the Kubernetes example Repo This pipeline demonstartes how to integrate frontend guestbook app code with backend redis-docker image provided by GCP.
- Example Tasks are in:
Here are the Task Types that are defined.
build-push
: This task as the name suggests build an image via kaniko and pushes it to registry.make
: Runs make target.integration-test-in-docker
: This is a new task that is used in the sample pipelines to test an app in usingdocker build
command to build an image with has the integration test code. This task then callsdocker run
which will run the test code. This follows the steps we have for kritis integration testdeploy-with-helm
: This task deploys a kubernetes app with helm.deploy-with-kubectl
: This task deploys with kubectl apply -f
The runs dir contains an example TaskRun and an example PipelineRun.
run-kritis-test.yaml shows an example of how to manually run kritis unit test off your development branch.
kritis-pipeline-run.yaml shows an example of
what it would look like to invoke the kritis example pipeline
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).