[libvirt PATCH v2 0/6] ci: helper: Rewrite image listing in Python and add stale Docker image checker

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Technically v2 of
https://listman.redhat.com/archives/libvir-list/2021-February/msg00641.html,
but the changes are not minor anymore so I had to change the subject.

since v1:
    - integrated the standalone script to the recently added 'helper' script
    - ditched the hardcode libvirt project ID and instead we work with
      namespacing instead (which is converted to the right URL under the hood)
    - util module moved to the ci/ directory
    - all util functions now use proper Python type hinting
    - ID is now printed along with the stale image name
    - address formatting issues raised

v1: https://listman.redhat.com/archives/libvir-list/2021-February/msg00641.ht=
ml

EXAMPLE OUTPUT OF THE REGISTRY CHECKER:

The following images can be purged from the registry:

    ci-debian-9: 1154661
    ci-debian-9-cross-aarch64: 1154667
    ci-debian-9-cross-mipsel: 1154669
    ci-debian-9-cross-armv7l: 1154671
    ci-debian-9-cross-armv6l: 1154676
    ci-debian-9-cross-mips: 1154678
    ci-debian-9-cross-ppc64le: 1154682
    ci-debian-9-cross-s390x: 1154683
    ci-debian-9-cross-mips64el: 1154686
    ci-fedora-31: 1154687
    ci-opensuse-151: 1154724

You can remove the above images over the API with the following code snippet:

    $ for image_id in 1154661 1154667 1154669 1154671 1154676 1154678 1154682=
 \
          1154683 1154686 1154687 1154724; do \
          curl --request DELETE --header "PRIVATE-TOKEN: <access_token>" \
          https://gitlab.com/api/v4/projects/libvirt%2Flibvirt/registry/repos=
itories/$image_id \
      done

Erik Skultety (6):
  ci: Makefile: Specify a help target to replace ci-help
  ci: helper: Use the ArgumentDefaultsHelpFormatter help formatter
  ci: helper: Introduce --quiet
  ci: Introduce a util module
  ci: helper: Rewrite image listing to Python
  ci: util: Add a registry checker for stale images

 ci/Makefile       |  16 ++-----
 ci/helper         | 108 ++++++++++++++++++++++++++++++++++++++++++++--
 ci/list-images.sh |  14 ------
 ci/util.py        |  52 ++++++++++++++++++++++
 4 files changed, 159 insertions(+), 31 deletions(-)
 delete mode 100644 ci/list-images.sh
 create mode 100644 ci/util.py

--=20
2.29.2





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux