Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ of the event. Inside the root key, the whole `spec` and `status` of the resource
"params": [
{
"name": "url",
"value": "https://api.hub.tekton.dev/resource/96"
"value": "https://artifacthub.io/packages/tekton-task/tekton-catalog-tasks/git-clone"
}
],
"resources": {},
Expand Down
6 changes: 3 additions & 3 deletions docs/hub-resolver.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Use resolver type `hub`.
| Param Name | Description | Example Value |
|------------------|-------------------------------------------------------------------------------|------------------------------------------------------------|
| `catalog` | The catalog from where to pull the resource (Optional) | Default: `tekton-catalog-tasks` (for `task` kind); `tekton-catalog-pipelines` (for `pipeline` kind) |
| `type` | The type of Hub from where to pull the resource (Optional). Either `artifact` or `tekton` | Default: `artifact` |
| `type` | The type of Hub from where to pull the resource (Optional). Either `artifact` or `tekton` | Default: `artifact` (recommended). Note: `tekton` type is deprecated. |
| `kind` | Either `task` or `pipeline` (Optional) | Default: `task` |
| `name` | The name of the task or pipeline to fetch from the hub | `golang-build` |
| `version` | Version or a Constraint (see [below](#version-constraint) of a task or a pipeline to pull in from. Wrap the number in quotes! | `"0.5.0"`, `">= 0.5.0"` |
Expand Down Expand Up @@ -49,9 +49,9 @@ for the name, namespace and defaults that the resolver ships with.
### Configuring the Hub API endpoint

The Hub Resolver supports to resolve resources from the [Artifact Hub](https://artifacthub.io/) and the [Tekton Hub](https://hub.tekton.dev/),
which can be configured by setting the `type` field of the resolver.
which can be configured by setting the `type` field of the resolver.

*(Please note that the [Tekton Hub](https://hub.tekton.dev/) will be deprecated after [migration to the Artifact Hub](https://github.com/tektoncd/hub/issues/667) is done.)*
** DEPRECATION NOTICE: [Tekton Hub](https://hub.tekton.dev/) is deprecated. Users should migrate to [Artifact Hub](https://artifacthub.io/) for discovering and managing Tekton resources. See the [migration guide](https://github.com/tektoncd/hub/issues/667) for more information.**

When setting the `type` field to `artifact`, the resolver will hit the public hub api at https://artifacthub.io/ by default
but you can configure your own (for example to use a private hub
Expand Down
8 changes: 4 additions & 4 deletions examples/v1/pipelineruns/beta/http-resolver-credentials.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ metadata:
generateName: http-resolver-
spec:
workspaces:
- name: output
emptyDir: {}
- name: output
emptyDir: {}
pipelineSpec:
workspaces:
- name: output
- name: output
tasks:
- name: http-resolver
taskRef:
resolver: http
params:
- name: url
value: https://api.hub.tekton.dev/v1/resource/tekton/task/git-clone/0.10/raw
value: https://raw.githubusercontent.com/tektoncd/catalog/main/task/git-clone/0.10/git-clone.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why aren't we using the artifact hub https://artifacthub.io/packages/tekton-task/tekton-catalog-tasks/git-clone task here ? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Umm I guessed artifact didn't provide raw content APIs, doest it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The raw content API doesn't simply return the yaml file, which would be required for the http resolver to work. The API will return the raw package, from https://artifacthub.io/api/v1/packages/tekton-task/tekton-catalog-tasks/git-clone, but there isn't an obvious way I don't think to retrieve the manifest using just an http request

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this need to be captured in an issue so we can use links from artifact hub directly ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it needs to be, since these are examples for the http resolver and only used the tekton hub's raw endpoint coincidentally. The hub resolver can reference artifact hub directly

- name: http-username
value: git
- name: http-password-secret
Expand Down
8 changes: 4 additions & 4 deletions examples/v1/pipelineruns/beta/http-resolver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ metadata:
generateName: http-resolver-
spec:
workspaces:
- name: output
emptyDir: {}
- name: output
emptyDir: {}
pipelineSpec:
workspaces:
- name: output
- name: output
tasks:
- name: http-resolver
taskRef:
resolver: http
params:
- name: url
value: https://api.hub.tekton.dev/v1/resource/tekton/task/git-clone/0.10/raw
value: https://raw.githubusercontent.com/tektoncd/catalog/main/task/git-clone/0.10/git-clone.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why aren't we using the artifact hub https://artifacthub.io/packages/tekton-task/tekton-catalog-tasks/git-clone task here ? 🤔

params:
- name: url
value: "https://github.com/kelseyhightower/nocode"
Expand Down