Skip to content

Commit

Permalink
Adds doc defining steps to add new catalog in Hub
Browse files Browse the repository at this point in the history
Signed-off-by: Shivam Mukhade <smukhade@redhat.com>
  • Loading branch information
SM43 committed Mar 5, 2021
1 parent d29cf3d commit b648ae7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/ADD_NEW_CATALOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Adding New Catalog to Hub

This doc defines the step to add new catalog to Hub. The catalog must follow the structure defined in the [Catalog Organization TEP][tep].

1. Create a pull request to Hub repository and add your catalog details in [Hub Config file][config].
Make sure you give a unique name which is not used for other catalogs defined in Config file.
This name will be used in identifying catalog and will be used in API to search resources.
eg. `/resource/<catalog-name>/<resource-name>`

2. Once the pull request is merged, Invoke the `/system/config/refresh` API. This will add the new catalog details in db. To access the API, you need to have `config:refresh` scope.

3. Now, use the Catalog refresh API `catalog/<catalogName>/refresh` to add resources from catalog in hub database. To access the API, you need to have `catalog:refresh` scope.
You can check on Hub UI for the new resources.

NOTE: For API documentaton, use `https://api.hub.tekton.dev/schema/swagger.json` in any swagger editor.

[tep]: https://github.com/tektoncd/community/blob/main/teps/0003-tekton-catalog-organization.md
[config]: https://github.com/tektoncd/hub/blob/d29cf3d2a522bc6d27357083aa0cf896ea22f242/config.yaml#L49

0 comments on commit b648ae7

Please sign in to comment.