This patch adds a Dockerfile which installs all needed dependencies to
run the image tagger. This should also serve as documentation on how to
properly set one's environment to run the image tagger scripts.
It's currently somewhat cumbersome to diagnose when an error happens
during the multi-arch tagging process. I thought I'd improve this by
saving the (possible) error message returned by the registry in a file
and then displaying it if appropriate.
A simpler option would be to pass "-o /dev/stderr" when invoking curl,
but I'm afraid that we might pollute the output with some unforseen
string being returned by the registry.
Currently we don't update latest/edge shorthand tags. There's a plan
to implement tagging similar to snaps[1]. In the meantime, update
latest/edge tags according to the following rules:
If the repository is 'lts',
set both 'latest' and 'edge' tags to the latest LTS release.
If the repository is 'ubuntu',
set 'latest' tag to the latest stable release and
set 'edge' tag to the devel release.
We do not want to tag devel releases with stable/beta/candidate tags
(so called inherited tags), but we still want XX.YY_edge implict tag
alongside XX.YY and $release_name tags.
github.com/golang/pkgsite, the upstream for pkg.go.dev, had its frontend
refactored since the current golang-manifest-builder.py was written.
This patch adjusts the script to properly parse the new package unit
page to fetch the package repository.
tag-images.sh: add --tag-filter to tag only a specific _edge tag
Currently the tag-images.sh script interates over all the given _edge
tags from the given images in the given namespace and adds the needed
tags (eg. _beta, _candidate or _stable). That's not always
wanted. Eg. when using the script in a CI pipeline where a job does
only update a specific image (eg. the "impish-21.10_edge" tagged
image), the script should only add the additional tags to that tagged
image.
With the new parameter, that's possible.
Assuming there are multiple _edge tags (eg. "impish-21.10_edge" and
"hirsute-21.04_edge") for a given image and --tag-filter is set to
"impish", the script will now only add the extra tags to the image
that is tagged with "impish-21.10_edge" .
Note: --tag-filter only works when the given IMAGE is a base
image (means that IMAGE must be "ubuntu").
It's not good to print info messages during the login process because
they can pollute the output of other scripts. This commit gets rid of
one such message, and transforms another info message into a debug
message.