Commit Graph

10 Commits

Author SHA1 Message Date
Erik Skultety
efa8ca47b9 ci: util: Add a registry checker for stale images
This function checks whether there are any stale Docker images in the
registry that can be purged. Since we're pulling available container
images from our GitLab registry with the 'list-images' action, it
could happen that we'd list old (already unsupported) images and make
them available for the user to consume and run a build in them.
Naturally, the build will most likely fail leaving the user confused.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2021-03-19 11:50:07 +01:00
Erik Skultety
c5f9617b1c ci: helper: Rewrite image listing to Python
The corresponding Bash script is dropped.
After this patch's rewrite, the Makefile's original image listing
target remains intact only to notify the user to use the Python helper
instead.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2021-03-19 11:47:26 +01:00
Erik Skultety
013b5a085a ci: helper: Introduce --quiet for the refresh command
Offer an option to silence all output to stdout coming out of the
dockerfiles/varsfiles generating code.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2021-03-19 11:46:33 +01:00
Erik Skultety
cbd7124f49 ci: helper: Use the ArgumentDefaultsHelpFormatter help formatter
This help formatter class reports the defaults we use for options
taking an argument.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2021-03-19 10:58:51 +01:00
Andrea Bolognani
22ed68d0a9 ci: Implement 'test' helper action
This simply calls the underlying Makefile target, but allows
additional arguments to be specified in a more convenient and
discoverable way.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2021-03-15 18:49:03 +01:00
Andrea Bolognani
f0fd72381d ci: Implement 'build' helper action
This simply calls the underlying Makefile target, but allows
additional arguments to be specified in a more convenient and
discoverable way.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2021-03-15 18:49:03 +01:00
Andrea Bolognani
897974c0b3 ci: Implement 'shell' helper action
This simply calls the underlying Makefile target, but allows
additional arguments to be specified in a more convenient and
discoverable way.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2021-03-15 18:49:03 +01:00
Andrea Bolognani
2481ad1125 ci: Implement 'list-images' helper action
This simply calls the underlying Makefile target.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2021-03-15 18:49:03 +01:00
Andrea Bolognani
06cb54f36b ci: Implement 'refresh' helper action
This provides the same functionality as the two refresh scripts
that are currently in the repository, with the following
advantages:

  * all files are refreshed with a single command;

  * if lcitool is present in the user's $PATH, it will be
    discovered and used automatically;

  * some output is produced, so the user can follow along with
    the progress of the operation.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2021-03-15 18:49:03 +01:00
Andrea Bolognani
b204cdab69 ci: Add helper script
This is intended to be perform a number of CI-related operations
that are currently implemented in various different scripts
written in various different programming languages.

Eventually, all existing functionality will be reimplemented in
Python and made available through this single entry point; for
now, let's start with a very basic skeleton.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2021-03-15 18:49:03 +01:00