Continuous Integration

Ozone ships with a host of Tekton task and pipeline templates which can be used to build your pipelines within minutes on the Ozone Pipeline Studio. This documentation will guide you through building a CI pipeline, before which, we strongly recommend you to have completed all the onbaording activities listed out in our Quick Onboarding Tour.

This guide shows how to configure an Ozone CI pipeline that builds and tests a codebase with multiple tasks running in sequence and parallel to finally push the docker-built image into an image registry. Here are the set of tasks making up this CI pipeline:

  1. Git Pull

  2. Golang Build

  3. Golang test

  4. YAML lint check

  5. Sonarqube scan

  6. Docker-build

  7. Image scan with Grype

  8. Image push to repo

Select Pipeline Templates from the left hand menu and toggle to the task templates.

A list of all the Tekton task templates can be accessed from here. Look for all possible task templates provided on Ozone which would suite your use case before proceeding to create a pipeline.

Toggle to pipeline templates and select “+ New Pipeline” to access the Ozone Pipeline Studio and begin creating the CI pipeline.

Let’s start with adding the first git pull task onto the canvas. Just search for the task by category or typing in the search field. Drag and drop it onto the canvas.

You can simply search for the task name in the catalogue to locate the required tasks easily.

Assuming you are working on a Go project for this example, add a task for the golang build.

As a next step, to test the build, we have a Golang test task to be added:

This way, the remainder of the tasks can be dragged and dropped from the task catalogue onto the canvas. After all the tasks have been added, this is what you should be left with:

Once all the desired tasks are on the canvas, let’s now proceed to connecting them in order of execution. To do this, just click on one of the four node points of the tasks to form and arrow and connect the same to the next downstream task.

Once the connect is confirmed, a window opens up to map input and out put parameters. Once you map them, click on done.

Note that the Ozone Pipeline Studio lets you configure tasks to execute in parallel as well, giving you major flexibilities and reducing pipeline management complexity. You can have the YAML lint and Sonarqube scan running in parallel followed by the docker build. Finally, once you finish mapping parameters to all the tasks, this is what the pipeline looks like:

Last updated