|
| 1 | +<!-- |
| 2 | +--- |
| 3 | +linkTitle: "HTTP Resolver" |
| 4 | +weight: 311 |
| 5 | +--- |
| 6 | +--> |
| 7 | + |
| 8 | +# HTTP Resolver |
| 9 | + |
| 10 | +This resolver responds to type `http`. |
| 11 | + |
| 12 | +## Parameters |
| 13 | + |
| 14 | +| Param Name | Description | Example Value | |
| 15 | +|------------------|-------------------------------------------------------------------------------|------------------------------------------------------------| |
| 16 | +| `url` | The URL to fetch from | https://raw.githubusercontent.com/tektoncd-catalog/git-clone/main/task/git-clone/git-clone.yaml | |
| 17 | + |
| 18 | +A valid URL must be provided. Only HTTP or HTTPS URLs are supported. |
| 19 | + |
| 20 | +## Requirements |
| 21 | + |
| 22 | +- A cluster running Tekton Pipeline v0.41.0 or later. |
| 23 | +- The [built-in remote resolvers installed](./install.md#installing-and-configuring-remote-task-and-pipeline-resolution). |
| 24 | +- The `enable-http-resolver` feature flag in the `resolvers-feature-flags` ConfigMap in the |
| 25 | + `tekton-pipelines-resolvers` namespace set to `true`. |
| 26 | +- [Beta features](./additional-configs.md#beta-features) enabled. |
| 27 | + |
| 28 | +## Configuration |
| 29 | + |
| 30 | +This resolver uses a `ConfigMap` for its settings. See |
| 31 | +[`../config/resolvers/http-resolver-config.yaml`](../config/resolvers/http-resolver-config.yaml) |
| 32 | +for the name, namespace and defaults that the resolver ships with. |
| 33 | + |
| 34 | +### Options |
| 35 | + |
| 36 | +| Option Name | Description | Example Values | |
| 37 | +|-----------------------------|------------------------------------------------------|------------------------| |
| 38 | +| `fetch-timeout` | The maximum time any fetching of URL resolution may take. **Note**: a global maximum timeout of 1 minute is currently enforced on _all_ resolution requests. | `1m`, `2s`, `700ms` | |
| 39 | + |
| 40 | +## Usage |
| 41 | + |
| 42 | +### Task Resolution |
| 43 | + |
| 44 | +```yaml |
| 45 | +apiVersion: tekton.dev/v1beta1 |
| 46 | +kind: TaskRun |
| 47 | +metadata: |
| 48 | + name: remote-task-reference |
| 49 | +spec: |
| 50 | + taskRef: |
| 51 | + resolver: http |
| 52 | + params: |
| 53 | + - name: url |
| 54 | + value: https://raw.githubusercontent.com/tektoncd-catalog/git-clone/main/task/git-clone/git-clone.yaml |
| 55 | +``` |
| 56 | +
|
| 57 | +### Pipeline Resolution |
| 58 | +
|
| 59 | +```yaml |
| 60 | +apiVersion: tekton.dev/v1beta1 |
| 61 | +kind: PipelineRun |
| 62 | +metadata: |
| 63 | + name: http-demo |
| 64 | +spec: |
| 65 | + pipelineRef: |
| 66 | + resolver: http |
| 67 | + params: |
| 68 | + - name: url |
| 69 | + value: https://raw.githubusercontent.com/tektoncd/catalog/main/pipeline/build-push-gke-deploy/0.1/build-push-gke-deploy.yaml |
| 70 | +``` |
| 71 | +
|
| 72 | +--- |
| 73 | +
|
| 74 | +Except as otherwise noted, the content of this page is licensed under the |
| 75 | +[Creative Commons Attribution 4.0 License](https://creativecommons.org/licenses/by/4.0/), |
| 76 | +and code samples are licensed under the |
| 77 | +[Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0). |
0 commit comments