Specifying remote pipelines using hub resolvers

TOC

Feature Overview

Pipelines are reusable blocks for your CI/CD processes. When creating a pipeline run, you can specify a remote pipeline from the Catalog available on Hub. We supply a default Hub instance for you to use.

Steps

1. Select a Pipeline

Here is the pipelines available on Hub:

2. Specifying the remote task using the hub resolver

To specify a remote pipeline, use the following reference format in the pipelineRef:

# ...
spec:
  pipelineRef:
    resolver: hub
    params:
    - name: catalog
      value: catalog
    - name: kind
      value: pipeline
    - name: name
      value: <resource_name>
    - name: version
      value: "<resource_version>"
# ...
ParameterDescriptionExample value
catalogThe catalog for pulling the resource.catalog
kindEither task or pipeline.pipeline
nameThe name of the task or pipeline to fetch from the hub.java-image-build-scan-deploy
versionThe version of the task or pipeline to fetch from the hub. You must use quotes (") around the number."0.1"

If the pipeline requires additional parameters, specify values for these parameters in the params section of the specification of the pipeline run. The params section of the pipelineRef specification must contain only the parameters that the resolver supports.

Examples:

The following example pipeline run references a remote pipeline from the catalog:

apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
  name: hub-pipeline-reference-demo
spec:
  pipelineRef:
    resolver: hub
    params:
    - name: catalog
      value: catalog
    - name: kind
      value: pipeline
    - name: name
      value: java-image-build-scan-deploy
    - name: version
      value: "0.1"
  params:
  - name: sample-pipeline-parameter
    value: test

Learn More