Skip to content

Latest commit

 

History

History
 
 

examples

Examples

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/
kubectl apply -f examples/pipelines
kubectl apply -f examples/invocations

Example Pipelines

We have 2 example Pipelines in ./pipelines

Kritis Pipeline

The Kritis Pipline: This example builds a Pipeline for the kritis project, 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

Guestbook Pipeline

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.

Pipeline Configuration

Example Tasks

Here are the Task Types that are defined.

  1. build-push: This task as the name suggests build an image via kaniko and pushes it to registry.
  2. make: Runs make target.
  3. integration-test-in-docker: This is a new task that is used in the sample pipelines to test an app in using docker build command to build an image with has the integration test code. This task then calls docker run which will run the test code. This follows the steps we have for kritis integration test
  4. deploy-with-helm: This task deploys a kubernetes app with helm.
  5. deploy-with-kubectl: This task deploys with kubectl apply -f

Example Runs

The invocations directory contains an example TaskRun and two example PipelineRuns.

run-kritis-test.yaml shows an example of how to manually run kritis unit test off your development branch.

The example PipelineRuns are: