Resolver Type
This resolver responds to typehub.
Parameters
string
required
The name of the Task or Pipeline to fetch from the hub.Example:
golang-build, git-clonestring
required
Version or version constraint of the resource. Must be quoted!Example:
"0.5.0", ">= 0.5.0", ">= 0.7.0, < 2.0.0"string
default:"task"
The type of resource to fetch.Options:
task, pipelinestring
The catalog to pull the resource from. Defaults depend on the kind and type.
- Default for tasks:
tekton-catalog-tasks - Default for pipelines:
tekton-catalog-pipelines
tekton-catalog-tasksstring
default:"artifact"
The type of Hub to pull from.Options:
artifact (recommended), tekton (deprecated)Requirements
- A cluster running Tekton Pipeline v0.41.0 or later
- Built-in remote resolvers installed
- The
enable-hub-resolverfeature flag set totruein theresolvers-feature-flagsConfigMap - Beta features enabled
Configuration
The Hub Resolver uses thehubresolver-config ConfigMap in the tekton-pipelines-resolvers namespace.
Configuration Options
default-tekton-hub-catalog
Default Tekton Hub catalog (e.g.,
Tekton)default-artifact-hub-task-catalog
Default Artifact Hub catalog for tasks (e.g.,
tekton-catalog-tasks)default-artifact-hub-pipeline-catalog
Default Artifact Hub catalog for pipelines (e.g.,
tekton-catalog-pipelines)default-kind
Default resource kind (e.g.,
task, pipeline)default-type
Default hub type (e.g.,
artifact, tekton)Configuring Hub API Endpoints
For Artifact Hub (default), the resolver useshttps://artifacthub.io/ by default. Configure a custom endpoint using the ARTIFACT_HUB_API environment variable:
https://api.hub.tekton.dev by default. Configure a custom endpoint using the TEKTON_HUB_API environment variable:
Versioning
The Hub Resolver supports semantic versioning:- Artifact Hub: Uses full semver (
<major>.<minor>.0) - Tekton Hub: Uses simplified semver (
<major>.<minor>)
Version Constraints
You can specify version constraints using the go-version syntax:Usage Examples
Task Resolution from Artifact Hub
Task Resolution with Version Constraint
git-clone task that is greater than or equal to version 0.7.0.
Task Resolution with Version Range
git-clone task that is greater than or equal to 0.7.0 and less than 2.0.0. For example, if version 0.9.0 is the latest available, it will be selected.
Pipeline Resolution from Artifact Hub
Task Resolution from Tekton Hub (Deprecated)
Using Default Values
When using default configuration, you can omit optional parameters:Version Constraint Examples
Always wrap version numbers and constraints in quotes to ensure proper YAML parsing.