cnb-rs repo tag annotation
cnb-rs repo tag annotation <subcommand>Tag 的元数据(key=value 键值对)管理。与 commit annotation 是同类机制,绑定对象从 commit 改为 tag。
典型用途
- 标记 release 元数据:
builder=github-actionssbom=https://...signed_by=cnb-bot - 关联外部系统:
jira=PROJ-1234crq=CHG12345 - 审计追踪:构建时戳、签名者、CI pipeline ID
子命令
- cnb-rs repo tag annotation list — 列出指定 tag 的所有 annotations
- cnb-rs repo tag annotation set — 设置 annotation(支持一次多个 key=value)
- cnb-rs repo tag annotation delete — 删除指定 annotation key(alias
rm)
示例
bash
# 设置多个 annotations 一次性
cnb-rs --repo wwvo/cnb-rs/cnb-rs repo tag annotation set v1.0.0 \
builder=github-actions \
sbom=https://example.com/sbom.spdx.json \
signed_by=release-bot
# 列出
cnb-rs --repo wwvo/cnb-rs/cnb-rs repo tag annotation list v1.0.0
# 删除某个 key
cnb-rs --repo wwvo/cnb-rs/cnb-rs repo tag annotation rm v1.0.0 builder -y另请参阅
- cnb-rs repo tag
- cnb-rs commit annotation — 同样的 KV 机制,绑定对象是 commit