File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 1+ oras /
2+
Original file line number Diff line number Diff line change @@ -56,6 +56,27 @@ tag_and_push() {
5656 echo " -- tagging: $target "
5757 docker tag $source $target
5858 docker push $target
59+ attach_eol_manifest $target
60+ }
61+
62+ attach_eol_manifest () {
63+ local image=" $1 "
64+ local today=$( date -u +' %Y-%m-%d' )
65+ install_oras_if_needed
66+ # oras is re-using Docker credentials, so we don't need to login.
67+ # Following the advice in https://portal.microsofticm.com/imp/v3/incidents/incident/476783820/summary
68+ ./oras/oras attach --artifact-type application/vnd.microsoft.artifact.lifecycle --annotation " vnd.microsoft.artifact.lifecycle.end-of-life.date=$today " $image
69+ }
70+
71+ install_oras_if_needed () {
72+ if [[ -x oras/oras ]]; then
73+ return
74+ fi
75+ local version=" 1.1.0"
76+ curl -sLO " https://github.com/oras-project/oras/releases/download/v${version} /oras_${version} _linux_amd64.tar.gz"
77+ mkdir -p oras
78+ tar -zxf oras_${version} _linux_amd64.tar.gz -C oras
79+ rm oras_${version} _linux_amd64.tar.gz
5980}
6081
6182publish_docker_images_with_arch_suffix () {
You can’t perform that action at this time.
0 commit comments