~toabctl/ubuntu-docker-images/+git/utils:tag-filter

Last commit made on 2021-07-15
Get this branch:
git clone -b tag-filter https://git.launchpad.net/~toabctl/ubuntu-docker-images/+git/utils
Only Thomas Bechtold can upload to this branch. If you are Thomas Bechtold please log in for upload directions.

Branch information

Name:
tag-filter
Repository:
lp:~toabctl/ubuntu-docker-images/+git/utils

Recent commits

7469a2d... by Thomas Bechtold

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").

3206a6f... by Sergio Durigan Junior

helpers/registry-login.sh: Reduce verbosity

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.

Signed-off-by: Sergio Durigan Junior <email address hidden>

76efc1a... by Sergio Durigan Junior

lib/{image,tag}.sh: Fix shellcheck warnings

Running shellcheck on these two files will flag a few minor things
that can be easily fixed. This commit addresses them.

Signed-off-by: Sergio Durigan Junior <email address hidden>

747221d... by Sergio Durigan Junior

tag-images.sh: Reorganize code to reduce indentation

If we move the code to tag the distroname and the distroversion up, we
can bail out of the loop earlier if we're tagging a devel release,
which means that we can reduce the indentation level of the subsequent
code.

Signed-off-by: Sergio Durigan Junior <email address hidden>

b8b5b74... by Thomas Bechtold

helpers/registry-login: allow AWS_{ACCESS_KEY_ID,_SECRET_ACCESS_KEY}

Currently there needs to be a AWS profile configured to tag images on
AWS. With this change, it's also possible to use the standard[0] AWS
environment variables to provide the credentials for login.

[0]
https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html

da35b41... by Thomas Bechtold

helpers/registry-login.sh: allow setting AWS_PROFILE

Currently a AWS_PROFILE needs to be configured with the name of the
NAMESPACE that is used. Eg. when trying to tag images under ubuntu/,
the AWS profile "ubuntu" must be there. That is not a good name where
multiple profiles are available.
So allow setting the env var AWS_PROFILE and use the profile set
there.

e5f6309... by Thomas Bechtold

tag-images.sh: do not tag stable/beta/candidate the devel release

The release under development should not be tagged with
stable/beta/candidate because it's currently under development.
So use distro-info to get the release under development and skip that
image for tagging.
Note: the distroname tag and release version tag are still added.

914a5c8... by Thomas Bechtold

tag-images.sh: add --dry-run mode

Adding a --dry-run flag for running the script without adding any
tags.
This is useful to see what would happen with doing the actual
modifications.

c797029... by Thomas Bechtold

tag-images.sh: drop registry check for base image

The ubuntu base image is now also available on dockerhub in the ubuntu
namespace[0]. So allow using the tag-images.sh script with the
dockerhub registry.

[0] https://hub.docker.com/r/ubuntu/ubuntu

9cea8f2... by Bryce Harrington

software-versions.sh: Add a README