:_mod-docs-content-type: ASSEMBLY
[id="remote-pipelines-tasks-resolvers"]
= Specifying remote pipelines and tasks using resolvers
include::_attributes/common-attributes.adoc[]
:context: remote-pipelines-tasks-resolvers

toc::[]

Pipelines and tasks are reusable blocks for your CI/CD processes. You can reuse pipelines or tasks that you previously developed, or that were developed by others, without having to copy and paste their definitions. These pipelines or tasks can be available from several types of sources, from other namespaces on your cluster to public catalogs.

In a pipeline run resource, you can specify a pipeline from an existing source. In a pipeline resource or a task run resource, you can specify a task from an existing source.

In these cases, the _resolvers_ in {pipelines-title} retrieve the pipeline or task definition from the specified source at run time.

The following resolvers are available in a default installaton of {pipelines-title}:

Hub resolver:: Retrieves a task or pipeline from the Pipelines Catalog available on {artifact-hub} or {tekton-hub}.
Bundles resolver:: Retrieves a task or pipeline from a Tekton bundle, which is an OCI image available from any OCI repository, such as an OpenShift container repository.
Cluster resolver:: Retrieves a task or pipeline that is already created on the same {product-title} cluster in a specific namespace.
Git resolver:: Retrieves a task or pipeline binding from a Git repository. You must specify the repository, the branch, and the path.

[id="resolver-hub_{context}"]
== Specifying a remote pipeline or task from a Tekton catalog
You can use the hub resolver to specify a remote pipeline or task that is defined either in a public Tekton catalog of link:https://artifacthub.io/[{artifact-hub}] or in an instance of {tekton-hub}.

[IMPORTANT]
====
The {artifact-hub} project is not supported with {pipelines-title}. Only the configuration of {artifact-hub} is supported.
====

include::modules/op-resolver-hub-config.adoc[leveloffset=+2]
include::modules/op-resolver-hub.adoc[leveloffset=+2]

[id="resolver-bundles_{context}"]
== Specifying a remote pipeline or task from a Tekton bundle

You can use the bundles resolver to specify a remote pipeline or task from a Tekton bundle. A Tekton bundle is an OCI image available from any OCI repository, such as an OpenShift container repository.

include::modules/op-resolver-bundle-config.adoc[leveloffset=+2]
include::modules/op-resolver-bundle.adoc[leveloffset=+2]

[id="resolver-cluster_{context}"]
== Specifying a remote pipeline or task from the same cluster

You can use the cluster resolver to specify a remote pipeline or task that is defined in a namespace on the {product-title} cluster where {pipelines-title} is running.

include::modules/op-resolver-cluster-config.adoc[leveloffset=+2]
include::modules/op-resolver-cluster.adoc[leveloffset=+2]

[id="resolver-git_{context}"]
== Specifying a remote pipeline or task from a Git repository

You can use the Git resolver to specify a remote pipeline or task from a Git repostory. The repository must contain a YAML file that defines the pipeline or task. The Git resolver can access a repository either by cloning it anonymously or else by using the authenticated SCM API.

include::modules/op-resolver-git-config-anon.adoc[leveloffset=+2]
include::modules/op-resolver-git-config-scm.adoc[leveloffset=+2]
include::modules/op-resolver-git.adoc[leveloffset=+2]

[role="_additional-resources"]
[id="additional-resources_{context}"]
== Additional resources

* xref:../../cicd/pipelines/using-tekton-hub-with-openshift-pipelines.adoc#using-tekton-hub-with-openshift-pipelines[Using Tekton Hub with {pipelines-shortname}]
