Skip to content

Commit

Permalink
Annotrate task bundles with version
Browse files Browse the repository at this point in the history
STONEBLD-2821

Signed-off-by: Chenxiong Qi <[email protected]>
  • Loading branch information
tkdchen committed Oct 11, 2024
1 parent 8578b8d commit d029e76
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hack/build-and-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ do
ANNOTATIONS+=("org.opencontainers.image.source=${VCS_URL}")
ANNOTATIONS+=("org.opencontainers.image.revision=${VCS_REF}")
ANNOTATIONS+=("org.opencontainers.image.url=${VCS_URL}/tree/${VCS_REF}/${task_dir}")
concrete_task_version=$(yq '.metadata.labels."app.kubernetes.io/version"' "$prepared_task_file")
ANNOTATIONS+=("org.opencontainers.image.version=${concrete_task_version}")
# yq will return null if the element is missing.
if [[ "${task_description}" != "null" ]]; then
ANNOTATIONS+=("org.opencontainers.image.description=${task_description}")
Expand Down

0 comments on commit d029e76

Please sign in to comment.