1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-21 05:55:35 +00:00
catalog/task/tekton-catalog-publish/0.1
vinamra28 e763a4473e Use latest git-clone in Task's tests
With git-clone version 0.8 and onwards, it started running as non-root
and GKE clusters were having some issues, so, we temporarily moved all
tasks to use git-clone version 0.7. Ref: https://github.com/tektoncd/catalog/pull/1079

Since we have now moved to kind clusters in our CI, this issue is now
resolved and thus moving all tasks to use latest version of git-clone

Signed-off-by: vinamra28 <jvinamra776@gmail.com>
2023-09-22 09:32:22 +01:00
..
samples Add a task to publish a catalog as bundles 2021-05-04 12:01:42 +01:00
tests Use latest git-clone in Task's tests 2023-09-22 09:32:22 +01:00
README.md [TEP-0110] Update Tekton Catalog installation instructions 2022-08-16 16:25:52 +01:00
tekton-catalog-publish.yaml Add platforms annotation to several tasks 2021-10-18 15:35:34 +01:00

Tekton Catalog Publish

This task publishes each Task in a Tekton catalog as Tekton Bundles. The catalog must be structured as a Tekton Catalog.

Bundles are published to $REGISTRY/$PATH/<task-name>:<task-version> and, when TAG is provided, to $REGISTRY/$PATH/<task-name>:$TAG. An example of extra tag could be the git sha of the catalog repo that is being published. The task uses the tkn bundle command to publish, which is available in tkn starting with version v0.18.0.

Install the Task

kubectl apply -f https://api.hub.tekton.dev/v1/resource/tekton/task/tekton-catalog-publish/0.1/raw

Parameters

name description default
TKN_IMAGE tkn CLI container image to run this task. gcr.io/tekton-releases/dogfooding/tkn
REGISTRY The registry where bundles are published to
PATH The path in the registry tekton/catalog/tasks
TAG An optional extra tag (optional) ""

Workspaces

  • catalog: A workspace with the catalog to be published.
  • dockerconfig: An optional workspace that allows providing a .docker/config.json file for tkn to access the container registry. The file should be placed at the root of the Workspace with name config.json.

Platforms

The Task can be run on linux/amd64, linux/s390x, and linux/ppc64le platforms.

Usage

  1. Passing REGISTRY and catalog workspace:
apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
  generateName: tekton-catalog-publish-
spec:
  taskRef:
    name: tekton-catalog-publish
  workspaces:
    - name: source
      persistentVolumeClaim:
        claimName: my-source
  params:
     - name: REGISTRY
       value: icr.io
  1. Passing REGISTRY, PATH, TAG and both workspaces

    1. Sample secret can be found here

    2. Create TaskRun

apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
  generateName: tekton-catalog-publish-
spec:
  taskRef:
    name: tekton-catalog-publish
  workspaces:
    - name: source
      persistentVolumeClaim:
        claimName: my-source
    - name: dockerconfig
      secret:
        secretName: regcred
  params:
    - name: REGISTRY
      value: icr.io
    - name: PATH
      value: tekton/mycatalog/tasks
    - name: TAG
      value: 49456927aef7e81a48a972db2bfd6e19a64d9a77