Skip to content

Commit a68ad21

Browse files
divyansh42claude
andcommitted
Internalize Hub CLI functionality into tkn
Remove external dependency on github.com/tektoncd/hub and integrate the Hub CLI commands directly into the tektoncd/cli codebase. This eliminates the need for the openshift-pipelines/hub fork replacement and simplifies the dependency management. BREAKING CHANGE: Hub commands now default to --type=artifact instead of --type=tekton. Users relying on Tekton Hub resources must now explicitly specify --type=tekton when using hub search, get, or install commands. Signed-off-by: divyansh42 <diagrawa@redhat.com> Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent a0b2697 commit a68ad21

241 files changed

Lines changed: 31448 additions & 427 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/cmd/tkn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ CLI for tekton pipelines
2525
* [tkn completion](tkn_completion.md) - Prints shell completion scripts
2626
* [tkn customrun](tkn_customrun.md) - Manage CustomRuns
2727
* [tkn eventlistener](tkn_eventlistener.md) - Manage EventListeners
28-
* [tkn hub](tkn_hub.md) - Interact with tekton hub
28+
* [tkn hub](tkn_hub.md) - Interact with artifacthub
2929
* [tkn pipeline](tkn_pipeline.md) - Manage pipelines
3030
* [tkn pipelinerun](tkn_pipelinerun.md) - Manage PipelineRuns
3131
* [tkn task](tkn_task.md) - Manage Tasks

docs/cmd/tkn_hub.md

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## tkn hub
22

3-
Interact with tekton hub
3+
Interact with artifacthub
44

55
### Usage
66

@@ -10,26 +10,38 @@ tkn hub
1010

1111
### Synopsis
1212

13-
Interact with tekton hub
13+
Interact with artifacthub
14+
15+
Deprecation Notice: Tekton Hub support in CLI is being deprecated in favor of Artifact Hub.
16+
The following commands currently only work with Tekton Hub and may support Artifact Hub in a future release:
17+
- check-upgrade
18+
- downgrade
19+
- get
20+
- info
21+
- reinstall
22+
- search
23+
- upgrade
24+
25+
Action Required: Users should migrate to Artifact Hub by using the '--type artifact' flag
26+
with the install command. For example:
27+
tkn hub install task foo --type artifact --from tekton-catalog-tasks
28+
29+
When using '--type tekton', a deprecation warning will now be displayed.
30+
Artifact Hub (https://artifacthub.io) will become the only supported hub in future releases.
1431

1532
### Options
1633

1734
```
18-
--api-server string Hub API Server URL (default 'https://api.hub.tekton.dev' for 'tekton' type; default 'https://artifacthub.io' for 'artifact' type).
19-
URL can also be defined in a file '$HOME/.tekton/hub-config' with a variable 'TEKTON_HUB_API_SERVER'/'ARTIFACT_HUB_API_SERVER'.
35+
--api-server string Hub API Server URL.
36+
For artifact type: default 'https://artifacthub.io' (env: ARTIFACT_HUB_API_SERVER)
37+
For tekton type (DEPRECATED): default 'https://api.hub.tekton.dev' (env: TEKTON_HUB_API_SERVER)
38+
Can also be set in '$HOME/.tekton/hub-config'.
2039
-h, --help help for hub
21-
--type string The type of Hub from where to pull the resource. Either 'artifact' or 'tekton' (default "tekton")
40+
--type string The type of Hub from where to pull the resource. Either 'artifact' or 'tekton' (DEPRECATED: tekton type will be removed in a future release) (default "artifact")
2241
```
2342

2443
### SEE ALSO
2544

2645
* [tkn](tkn.md) - CLI for tekton pipelines
27-
* [tkn hub check-upgrade](tkn_hub_check-upgrade.md) - Check for upgrades of resources if present
28-
* [tkn hub downgrade](tkn_hub_downgrade.md) - Downgrade an installed resource
29-
* [tkn hub get](tkn_hub_get.md) - Get resource manifest by its name, kind, catalog, and version
30-
* [tkn hub info](tkn_hub_info.md) - Display info of resource by its name, kind, catalog, and version
3146
* [tkn hub install](tkn_hub_install.md) - Install a resource from a catalog by its kind, name and version
32-
* [tkn hub reinstall](tkn_hub_reinstall.md) - Reinstall a resource by its kind and name
33-
* [tkn hub search](tkn_hub_search.md) - Search resource by a combination of name, kind, categories, platforms, and tags
34-
* [tkn hub upgrade](tkn_hub_upgrade.md) - Upgrade an installed resource
3547

docs/cmd/tkn_hub_check-upgrade.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ Check for upgrades of resources if present
3131

3232
### SEE ALSO
3333

34-
* [tkn hub](tkn_hub.md) - Interact with tekton hub
34+
* [tkn hub](tkn_hub.md) - Interact with artifacthub
3535
* [tkn hub check-upgrade task](tkn_hub_check-upgrade_task.md) - Check updates for Task installed via Hub CLI
3636

docs/cmd/tkn_hub_downgrade.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ Downgrade an installed resource
3232

3333
### SEE ALSO
3434

35-
* [tkn hub](tkn_hub.md) - Interact with tekton hub
35+
* [tkn hub](tkn_hub.md) - Interact with artifacthub
3636
* [tkn hub downgrade task](tkn_hub_downgrade_task.md) - Downgrade an installed Task by its name to a lower version
3737

docs/cmd/tkn_hub_get.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Get resource manifest by its name, kind, catalog, and version
3030

3131
### SEE ALSO
3232

33-
* [tkn hub](tkn_hub.md) - Interact with tekton hub
33+
* [tkn hub](tkn_hub.md) - Interact with artifacthub
3434
* [tkn hub get pipeline](tkn_hub_get_pipeline.md) - Get Pipeline by name, catalog and version
3535
* [tkn hub get task](tkn_hub_get_task.md) - Get Task by name, catalog and version
3636

docs/cmd/tkn_hub_info.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ Display info of resource by its name, kind, catalog, and version
3030

3131
### SEE ALSO
3232

33-
* [tkn hub](tkn_hub.md) - Interact with tekton hub
33+
* [tkn hub](tkn_hub.md) - Interact with artifacthub
3434
* [tkn hub info task](tkn_hub_info_task.md) - Display info of Task by its name, catalog and version
3535

docs/cmd/tkn_hub_install.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,15 @@ Install a resource from a catalog by its kind, name and version
2626
### Options inherited from parent commands
2727

2828
```
29-
--api-server string Hub API Server URL (default 'https://api.hub.tekton.dev' for 'tekton' type; default 'https://artifacthub.io' for 'artifact' type).
30-
URL can also be defined in a file '$HOME/.tekton/hub-config' with a variable 'TEKTON_HUB_API_SERVER'/'ARTIFACT_HUB_API_SERVER'.
31-
--type string The type of Hub from where to pull the resource. Either 'artifact' or 'tekton' (default "tekton")
29+
--api-server string Hub API Server URL.
30+
For artifact type: default 'https://artifacthub.io' (env: ARTIFACT_HUB_API_SERVER)
31+
For tekton type (DEPRECATED): default 'https://api.hub.tekton.dev' (env: TEKTON_HUB_API_SERVER)
32+
Can also be set in '$HOME/.tekton/hub-config'.
33+
--type string The type of Hub from where to pull the resource. Either 'artifact' or 'tekton' (DEPRECATED: tekton type will be removed in a future release) (default "artifact")
3234
```
3335

3436
### SEE ALSO
3537

36-
* [tkn hub](tkn_hub.md) - Interact with tekton hub
38+
* [tkn hub](tkn_hub.md) - Interact with artifacthub
3739
* [tkn hub install task](tkn_hub_install_task.md) - Install Task from a catalog by its name and version
3840

docs/cmd/tkn_hub_install_task.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ Install Task from a catalog by its name and version
1515
### Examples
1616

1717

18-
Install a Task of name 'foo':
18+
Install a Task of name 'foo' from Artifact Hub:
1919

20-
tkn hub install task foo
20+
tkn hub install task foo --type artifact --from tekton-catalog-tasks --version 0.3.0
2121

2222
or
2323

24-
Install a Task of name 'foo' of version '0.3' from Catalog 'Tekton':
24+
Install a Task of name 'foo' from Tekton Hub (DEPRECATED):
2525

2626
tkn hub install task foo --version 0.3 --from tekton
2727

28-
Note that the resources in Artifact Hub follow full SemVer - <major>.<minor>.<patch> (e.g. 0.3.0),
29-
please double check the version used
28+
Note: Tekton Hub is deprecated. Use '--type artifact' with Artifact Hub instead.
29+
Resources in Artifact Hub follow full SemVer - <major>.<minor>.<patch> (e.g. 0.3.0).
3030

3131

3232
### Options
@@ -38,13 +38,15 @@ please double check the version used
3838
### Options inherited from parent commands
3939

4040
```
41-
--api-server string Hub API Server URL (default 'https://api.hub.tekton.dev' for 'tekton' type; default 'https://artifacthub.io' for 'artifact' type).
42-
URL can also be defined in a file '$HOME/.tekton/hub-config' with a variable 'TEKTON_HUB_API_SERVER'/'ARTIFACT_HUB_API_SERVER'.
41+
--api-server string Hub API Server URL.
42+
For artifact type: default 'https://artifacthub.io' (env: ARTIFACT_HUB_API_SERVER)
43+
For tekton type (DEPRECATED): default 'https://api.hub.tekton.dev' (env: TEKTON_HUB_API_SERVER)
44+
Can also be set in '$HOME/.tekton/hub-config'.
4345
-c, --context string Name of the kubeconfig context to use (default: kubectl config current-context)
4446
--from string Name of Catalog to which resource belongs.
4547
-k, --kubeconfig string Kubectl config file (default: $HOME/.kube/config)
4648
-n, --namespace string Namespace to use (default: from $KUBECONFIG)
47-
--type string The type of Hub from where to pull the resource. Either 'artifact' or 'tekton' (default "tekton")
49+
--type string The type of Hub from where to pull the resource. Either 'artifact' or 'tekton' (DEPRECATED: tekton type will be removed in a future release) (default "artifact")
4850
--version string Version of Resource
4951
```
5052

docs/cmd/tkn_hub_reinstall.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ Reinstall a resource by its kind and name
3333

3434
### SEE ALSO
3535

36-
* [tkn hub](tkn_hub.md) - Interact with tekton hub
36+
* [tkn hub](tkn_hub.md) - Interact with artifacthub
3737
* [tkn hub reinstall task](tkn_hub_reinstall_task.md) - Reinstall a Task by its name
3838

docs/cmd/tkn_hub_search.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ Search resources using tag 'cli':
4949

5050
### SEE ALSO
5151

52-
* [tkn hub](tkn_hub.md) - Interact with tekton hub
52+
* [tkn hub](tkn_hub.md) - Interact with artifacthub
5353

0 commit comments

Comments
 (0)