Skip to content

Commit

Permalink
devops: mark Docker images as EOL
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt committed Mar 7, 2024
1 parent 665af8d commit 6051808
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions utils/docker/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
oras/
20 changes: 20 additions & 0 deletions utils/docker/publish_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,26 @@ tag_and_push() {
docker push $target
}

attach_eol_manifest() {
local image="$1"
local today=$(date -u +'%Y-%m-%d')
install_oras_if_needed
# oras is re-using Docker credentials, so we don't need to login.
# Following the advice in https://portal.microsofticm.com/imp/v3/incidents/incident/476783820/summary
./oras/oras attach --artifact-type application/vnd.microsoft.artifact.lifecycle --annotation "vnd.microsoft.artifact.lifecycle.end-of-life.date=$today" $image
}

install_oras_if_needed() {
if [[ -x oras/oras ]]; then
return
fi
local version="1.1.0"
curl -sLO "https://github.com/oras-project/oras/releases/download/v${version}/oras_${version}_linux_amd64.tar.gz"
mkdir -p oras
tar -zxf oras_${version}_linux_amd64.tar.gz -C oras
rm oras_${version}_linux_amd64.tar.gz
}

publish_docker_images_with_arch_suffix() {
local FLAVOR="$1"
local TAGS=()
Expand Down

0 comments on commit 6051808

Please sign in to comment.