You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/development/catalog/convention.md
+53-9Lines changed: 53 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,12 +108,60 @@ spec:
108
108
memory: "4Gi"
109
109
```
110
110
111
-
### 4. Building Custom Images with Dependencies
111
+
### 4. Image Management for Catalog Tasks
112
112
113
-
If Tasks in the catalog depend on custom images, we need to provide `Dockerfile` and build pipelines in the catalog.
113
+
Catalog Tasks that expose configurable runtime images must publish metadata and defaults consistently so the UI and controllers can discover them.
114
114
115
-
- Build environments are stored in the `images/{image-name}` directory
116
-
- Image build pipeline orchestration files are stored in `.tekton/images/build-{image-name}.yaml`
115
+
#### Configurable Image Metadata
116
+
117
+
Represent each image option with a single `ConfigMap` scoped to one Task and one Task version. Include the human-readable name and full image reference, and add labels so the UI/controller can filter by Task/version.
118
+
119
+
```yaml
120
+
apiVersion: v1
121
+
kind: ConfigMap
122
+
metadata:
123
+
name: tekton-task-go-1-25
124
+
namespace: kube-public
125
+
labels:
126
+
catalog.tekton.dev/source: system
127
+
catalog.tekton.dev/tool-image-golang: 1.25
128
+
catalog.tekton.dev/tool-image-run-script: go-1.25
129
+
data:
130
+
name: "Go 1.25"
131
+
image: "registry.example.com/tekton/golang:1.25"
132
+
```
133
+
134
+
Key fields and labels:
135
+
- `data.name`: dropdown label.
136
+
- `data.image`: full image reference.
137
+
- `catalog.tekton.dev/source`: identifies the source.
138
+
- `catalog.tekton.dev/tool-image-<tool>`: identifies the tool image for the Task.
139
+
- `catalog.tekton.dev/tool-image-run-script`: identifies the tool image for `run-script` Task.
140
+
141
+
#### Catalog Defaults and Tagging
142
+
143
+
- Keep existing `image` parameter defaults in Tasks; do not clear them.
144
+
- Use minor-only tags for catalog images (for example, `v7.0`) and publish a `latest` alias for the newest minor release.
145
+
- Publish one `ConfigMap` per runtime version with `name` and `image` data plus Task/version labels; keep defaults on the current minor until a new Task minor is added.
146
+
- When introducing a new runtime minor (for example, Python 3.14), keep the older Task minor default on the previous image (3.13), add a new Task minor with no default image to force explicit selection, and add the corresponding per-version `ConfigMap` entries.
147
+
148
+
```yaml
149
+
global:
150
+
images:
151
+
python-3_13:
152
+
repository: devops/tektoncd/hub/python
153
+
tag: v3.13
154
+
python-latest:
155
+
repository: devops/tektoncd/hub/python
156
+
tag: latest
157
+
```
158
+
159
+
#### Custom Image Builds
160
+
161
+
If Tasks in the catalog depend on custom images, provide the `Dockerfile` and build pipelines in the catalog so they can be reproduced.
162
+
163
+
- Build environments are stored in the `images/{image-name}` directory.
164
+
- Image build pipeline orchestration files are stored in `.tekton/images/build-{image-name}.yaml`.
117
165
118
166
#### Image Security
119
167
@@ -136,11 +184,7 @@ If Tasks in the catalog depend on custom images, we need to provide `Dockerfile`
136
184
137
185
#### Image Tags
138
186
139
-
If the image is custom, you can directly use the version number generated by `git-version` in the pipeline as the Tag.
140
-
141
-
If the image is customized based on a specific community version, it is recommended to add the community version number as a prefix in the Tag. For example, `v0.56.0-{version}`
142
-
143
-
In the pipeline, you can specify the image prefix by configuring the `tag-prefix` parameter.
187
+
Follow the catalog tagging strategy above for custom builds (minor-only tags plus a `latest` alias). If the image is derived from a specific community version, include that upstream version in the tag prefix when needed for traceability (for example, `v0.56.0-v7.0`).
0 commit comments