0
0
mirror of https://github.com/renovatebot/renovate.git synced 2024-12-22 13:38:32 +00:00
renovatebot_renovate/lib/modules/manager/tekton
Risu 397ab49ef3
docs(managers): add missing url and displayName (#32621)
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
2024-12-01 08:47:27 +00:00
..
__fixtures__ feat(tekton): support pipelinesascode annotation (#26753) 2024-02-27 20:52:30 +00:00
__snapshots__ feat(manager/tekton): support step images (#20325) 2023-02-13 16:46:11 +01:00
extract.spec.ts feat(tekton): support pipelinesascode annotation (#26753) 2024-02-27 20:52:30 +00:00
extract.ts feat(tekton): support pipelinesascode annotation (#26753) 2024-02-27 20:52:30 +00:00
index.ts docs(managers): add missing url and displayName (#32621) 2024-12-01 08:47:27 +00:00
readme.md docs: fix versioning links (#28341) 2024-04-11 13:23:20 +00:00
types.ts feat(tekton): support pipelinesascode annotation (#26033) 2023-12-05 17:26:10 +00:00

Tekton is an open-source cloud-native Continuous Integration and Continuous Delivery/Deployment solution.

Tekton uses Tasks to capture specific commands to be executed, and Pipelines to combine different Tasks, to achieve a goal, like building a container image. Tasks and Pipelines are defined as Kubernetes custom resources.

The Tekton documentation is a great resource to learn more about the overall concepts and how to start using it.

Distributing Tasks and Pipeline definitions

There are different ways to distribute Task and Pipeline definitions. They can be created directly as a Kubernetes resource with standard tools like kubectl. Tasks and Pipeline definitions can also live outside the Kubernetes cluster and get fetched by Tekton when needed, this approach relies on Tekton resource references rather than the resource definition. The tekton manager focuses on providing updates to Tekton resource references.

Right now, Renovate's Tekton manager supports references that are Bundles and PipelinesAsCode with remote HTTP URL resolver. Read the Tekton Pipeline remote resolution docs for the different kinds of Tekton references and their corresponding resolvers.

Using a PipelinesAsCode remote URL reference

By specifying the annotation with a remote task or a remote pipeline based on the recommended way using git based versioning. How this can be used can be seen in the example below.

apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
  name: main
  annotations:
    pipelinesascode.tekton.dev/task: 'https://github.com/foo/bar/raw/v0.0.1/task/my-task/my-task.yaml'
    pipelinesascode.tekton.dev/pipeline: 'https://github.com/foo/bar/raw/v0.0.1/pipeline/my-pipeline/my-pipeline.yaml'

Supported URLs:

  1. https://github.com/foo/bar/raw/v0.0.1/tasks/task/task.yaml<
  2. https://raw.githubusercontent.com/foo/bar/v0.0.1/tasks/task/task.yaml
  3. https://github.com/foo/bar/releases/download/v0.0.1/create-git-tag-task.yaml

Using a Tekton Bundle reference

There are three ways to use a Tekton Bundle reference:

  1. Via the Tekton Bundles Resolver
  2. Via the tektoncd/resolution project
  3. Via the taskRun.spec.taskRef.bundle and the pipelineRun.spec.pipelineRef.bundle attributes

Renovate's Tekton manager supports all the methods listed above.

Configuring images in Tekton Tasks

You can configure the container images that Tekton uses when it runs tasks. You may use these attributes to configure images in a:

  1. Task step
  2. Task stepTemplate
  3. Task sidecar

You can define Tekton Tasks within these Tekton resources:

  1. Task
  2. TaskRun
  3. Pipeline
  4. PipelineRun

Renovate's Tekton manager supports all the image attributes for the Tekton resources mentioned above.

Set your own fileMatch pattern

The tekton manager does not have a default fileMatch pattern. This means it won't match any files until you set a fileMatch pattern. This is to avoid problems with unrelated YAML files since there is no well-established file name pattern for Tekton resources. As an example, the following config matches all the YAML files in a repository:

{
  "tekton": {
    "fileMatch": ["\\.yaml$", "\\.yml$"]
  }
}

See our versioning documentation for details on the existing versioning rules and possible alterations.