|
| 1 | +// This module is included in the following assemblies: |
| 2 | +// * create/remote-pipelines-tasks-resolvers.adoc |
| 3 | + |
| 4 | +// // *openshift_pipelines/remote-pipelines-tasks-resolvers.adoc |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="resolver-http-specify_{context}"] |
| 7 | += Specifying a remote pipeline or task with the HTTP Resolver |
| 8 | + |
| 9 | +When creating a pipeline run or task run, you can specify a remote pipeline or task from an HTTP or HTTPS URL. |
| 10 | + |
| 11 | +.Procedure |
| 12 | + |
| 13 | +* Specify a remote pipeline or task from an HTTP URL, using the following format in the `pipelineRef` or `taskRef` spec: |
| 14 | ++ |
| 15 | +[source,yaml] |
| 16 | +---- |
| 17 | +# ... |
| 18 | + resolver: http |
| 19 | + params: |
| 20 | + - name: url |
| 21 | + value: <fully_qualified_http_url> |
| 22 | +# ... |
| 23 | +---- |
| 24 | ++ |
| 25 | +.Supported parameters for the HTTP Resolver |
| 26 | +|=== |
| 27 | +| Parameter | Description | Example Value |
| 28 | +
|
| 29 | +| `url` |
| 30 | +| The HTTP URL pointing to the Tekton resource to fetch. |
| 31 | +| `https://raw.githubusercontent.com/openshift-pipelines/tektoncd-catalog/p/tasks/task-git-clone/0.4.0/task-git-clone.yaml` |
| 32 | +|=== |
| 33 | + |
| 34 | +The following example pipeline run references a remote pipeline from the same cluster: |
| 35 | + |
| 36 | +[source,yaml] |
| 37 | +---- |
| 38 | +apiVersion: tekton.dev/v1beta1 |
| 39 | +kind: PipelineRun |
| 40 | +metadata: |
| 41 | + name: http-pipeline-reference-demo |
| 42 | +spec: |
| 43 | + pipelineRef: |
| 44 | + resolver: http |
| 45 | + params: |
| 46 | + - name: url |
| 47 | + value: https://raw.githubusercontent.com/tektoncd/catalog/main/pipeline/build-push-gke-deploy/0.1/build-push-gke-deploy.yaml |
| 48 | + params: |
| 49 | + - name: sample-pipeline-parameter |
| 50 | + value: test |
| 51 | + - name: username |
| 52 | + value: "pipelines" |
| 53 | +---- |
| 54 | + |
| 55 | +The following example pipeline defines a task that references a remote task from the same cluster: |
| 56 | + |
| 57 | +[source,yaml] |
| 58 | +---- |
| 59 | +apiVersion: tekton.dev/v1beta1 |
| 60 | +kind: Pipeline |
| 61 | +metadata: |
| 62 | + name: pipeline-with-http-task-reference-demo |
| 63 | +spec: |
| 64 | + tasks: |
| 65 | + - name: "http-task-demo" |
| 66 | + taskRef: |
| 67 | + resolver: http |
| 68 | + params: |
| 69 | + - name: url |
| 70 | + value: https://raw.githubusercontent.com/openshift-pipelines/tektoncd-catalog/p/tasks/task-git-clone/0.4.0/task-git-clone.yaml |
| 71 | + params: |
| 72 | + - name: sample-task-parameter |
| 73 | + value: test |
| 74 | +---- |
| 75 | + |
| 76 | +The following example task run references a remote task from the same cluster: |
| 77 | + |
| 78 | +[source,yaml] |
| 79 | +---- |
| 80 | +apiVersion: tekton.dev/v1beta1 |
| 81 | +kind: TaskRun |
| 82 | +metadata: |
| 83 | + name: http-task-reference-demo |
| 84 | +spec: |
| 85 | + taskRef: |
| 86 | + resolver: http |
| 87 | + params: |
| 88 | + - name: url |
| 89 | + value: https://raw.githubusercontent.com/openshift-pipelines/tektoncd-catalog/p/tasks/task-git-clone/0.4.0/task-git-clone.yaml |
| 90 | + params: |
| 91 | + - name: sample-task-parameter |
| 92 | + value: test |
| 93 | +---- |
0 commit comments