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