action #107776
Updated by jlausuch almost 3 years ago
Currently, we have the variable `CONTAINER_IMAGE_VERSIONS` which translates an array (or single element) of images in the form of `15-SP1,15-SP2` (for SLE) into specific URL to the internal or external registry.
https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/lib/containers/urls.pm
So far, we have been testing only the SLE Base Image, and that URL translation done in `urls.pm` was ok, even though we need to modify it when a new SLE/Leap version comes up.
But NOW we need to test a bunch of new BCI images (besides Base) and this way to getting the URL is not scalable..
For example, if we want to trigger a test for `bci-minimal` on Amazon Kubernetes, the test currently relies on [`get_suse_container_urls()`](https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/tests/containers/push_container_image_to_ecr.pm#L19).
The idea is to provide a NEW job variable `CONTAINER_IMAGE_TO_TEST` **with full URL to the image**,
e.g. `CONTAINER_IMAGE_TO_TEST=registry.suse.de/suse/sle-15-sp3/update/cr/totest/images/bci/bci-minimal:15.3`
If this variable is present, the test shall NOT call `get_suse_container_urls()` and use the image URL directly to be pulled and tested.
The target files to be changed adding this feature shall be:
- [image.pm](https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/tests/containers/image.pm)
- [push_container_image_to_ecr.pm](https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/tests/containers/push_container_image_to_ecr.pm)
- [push_container_image_to_acr.pm](https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/tests/containers/push_container_image_to_acr.pm)
- [push_container_image_to_gcr.pm](https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/tests/containers/push_container_image_to_gcr.pm)