Using Buildpacks in Tekton Pipelines
Let's create a Tekton Pipeline by using Buildpacks.
We’ll create a new Pipeline that compiles source code to OCI images using Cloud Native Buildpacks. First, we need a Task that compiles the downloaded source code to an OCI image and then pushes the image to a registry. We’ll install the Task from the Tekton Catalog. Tekton Catalog is a Git repository of community-contributed Tekton entities (Tasks, Pipelines, and so on) ready for use in our Pipelines. We can access Tekton Catalog through a web interface known as Tekton Hub.
Install the buildpacks
We need to first install the buildpacks Task from Tekton Hub by running the command given in the 1_installBuildpack.sh
file.
This Task builds source code into a container image. To do this, it uses builders to run buildpacks against our application source. A builder is an image that contains an ordered combination of buildpacks and all the components necessary to execute a build.
The Task expects some required parameters and workspaces and returns the digest of the built image.