This Helm-Chart aims to generate Tekton resources, Pipeline and Tasks, in order to run known
contaimer image builders, like source-to-image
and buildpacks
as Tekton
resources.
Using this chart we can easily simulate inputs, as values.yaml
representation, and which resources
we need to generate in Tekton to achieve the objective.
helm install --dry-run tkn .
helm template tkn .
The application source code must be already present as a PipelineResource
in the cluster. Like for
example:
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
name: repository
spec:
type: git
params:
- name: revision
value: master
- name: url
value: https://github.com/sclorg/nodejs-ex.git
The name repository
is referenced by default in example values.yaml
entries.
This Helm-Chart allows you to represent different strageties, as in the builder system employed to construct container images.
Using Tekton Catalog's buildpack as example, it defines the Cloud Native Builder lifecycle commands to execute:
- Detect: runs
detector
, to recognize the code base platform, as Ruby, Python, Node.js, etc; - Analyze: runs
analyzer
, to inspect existing image for catching and metadata; - Restore: runs
restorer
, to restore previous application status, keeping a building cache; - Build: runs
builder
, to execute the container image build based on conclusions taken in the previous steps;
A example of buildpacks strategy is here.
helm install --debug --atomic --values="values.yaml" tkn .
Using source-to-image
container image, we can use s2i
to generate the project at hand a
Dockerfile
and later on calling out s2i
workflow scripts, in the builder image.
Dockerfile
: generate bys2i
;buildah
: creates a final container image;
A example of s2i strategy values is here.
helm install --debug --atomic --values="values-s2i.yaml" tkn .
Uses s2i
to create an Dockerfile
and Kaniko to build the final container image. A
example of values.yaml
for Kaniko strategy is here.
helm install --debug --atomic --values="values-kaniko.yaml" tkn .
Additionally, you can employ custom strategy to run your own Tekton Task steps. Please consider the example here
helm install --debug --atomic --values="values-custom.yaml" tkn .