mirror of
https://github.com/tektoncd/catalog.git
synced 2024-11-21 05:55:35 +00:00
e763a4473e
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> |
||
---|---|---|
.. | ||
samples | ||
tests | ||
README.md | ||
tekton-catalog-publish.yaml |
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 nameconfig.json
.
Platforms
The Task can be run on linux/amd64
, linux/s390x
, and linux/ppc64le
platforms.
Usage
- 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
-
Passing
REGISTRY
,PATH
,TAG
and both workspaces-
Sample secret can be found here
-
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