root/build-tools
Davlet Panech 775ad108af docker-images: better registry error handling
This commit enables better error detection when checking whether an
image/tag exists in a remote registry. Current implementation sometimes
falsely believes a remote tag is missing and attempts to (re-)push the
images, potentially overwriting them.

Examples:
- Registry is not reachable due to a temporary network outage
- With docker.io: we exceed the request rate limit. Original script
  looked for remote tags by enumerating all tags. This resulted in
  dozens of REST calls per image, occasionally exceeding Dockerhub's
  request limit.

Solution: add new script that exits on connectivity errors, rather than
returning false. Script requires an external tool, regctl:
  https://github.com/regclient/regclient

TESTS
====================================
- Test with missing/existing images in Harbor, DockerHub and
  AWS ECR registries, as well as various connectivity errors.
- Run retag-images.sh and make sure it still works

Closes-Bug: 2003898
Change-Id: Id9dd0c30580748c0c4c4bfbbd520d4d38bdd2ec6
Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
2023-05-05 17:03:30 -04:00
..
2023-03-22 14:09:08 +00:00
2018-06-27 13:04:02 -04:00
2018-09-17 16:41:31 -04:00
2018-09-17 16:41:31 -04:00
2018-06-01 07:45:23 -07:00
2021-02-19 12:33:58 -05:00
2022-04-11 09:25:08 -04:00
2018-09-07 14:44:37 -04:00
2018-09-07 14:44:37 -04:00
2020-06-08 16:54:14 +08:00
2022-05-10 17:09:08 -04:00