Metadata
About 211 wordsLess than 1 minute
What is Metadata?
Metadata is a data storage capability provided by repositories, supporting key-value annotations for Tags and Commits.
Storage Format
Stored in key: value format, e.g.: Tag v1.0.0 metadata:
key1: value1
key2: value2
# ...How to View
- Tag metadata: Repository → Tag or Release list → Details → Metadata (hidden when no data exists)
- Commit metadata: Repository → Commit list → Details → Metadata
The web interface currently only supports viewing — adding, modifying, and deleting are not available.
Management
You can add, delete, and query metadata through plugins in Cloud Native Build pipelines. See Metadata Plugin for details.
For example, write build info metadata for the current commit on a push event:
main:
push:
- stages:
- name: Write metadata
image: cnbcool/annotations:latest
settings:
type: ADD
data: |
build-id=$CNB_BUILD_ID
commit=$CNB_COMMIT_SHORTFor non-Tag events such as push, metadata is written to the current commit by default; for tag_push and tag_deploy.* events, metadata is written to the corresponding tag. After a successful write, you can view it under "Metadata" on the Commit or Tag detail page.