Skip to content

Add the ci-fairy commandline tool for commonly-used tasks

Peter Hutterer requested to merge whot/ci-templates:wip/python-tools into master

The templates are really useful for building containers but they lack support for deleting them.

This was originally born in libevdev - turns out that a small python script is easier to read than the skopeo combination we had before. The python-gitlab module (note: not the gitlab module, sigh) abstracts everything away just nicely.

So starting with that, here's a new proper tool called ci-fairy that will eventually provide the various commands we need occasionally. Right now, the only command supported would likely be invoked like this: ci-fairy delete-image --exclude-tag 2020-03-11.0 - that would delete all but the given tag.

There's room for more, I'm thinking of a --if-expired for #5 (closed) or something along those lines. I suspect there are other commands that may eventually become useful.

Noteworthy: I do not intend for this to become a generic gitlab tool, python-gitlab has one already anyway. This is a shortcut for things commonly used in the CI.

Merge request reports

Loading