Closed goldmann closed 6 years ago
FYI @rcernich @spolti @jwendell
@bartoszmajsak Can I ask for review?
Summoning @lordofthejars. I'm on a medical leave right now.
@lordofthejars Hey Alex, any chance you could take a look?
Currently really busy and I have no time to review but I will do ASAP.
@lordofthejars Requested changes applied, tests added.
Sorry to not mention before but I have noticed that there are no docs. I think that since this is a new feature would be interesting to add in documentation as well.
@lordofthejars Will add it.
@lordofthejars Done!
Short description of what this resolves:
It is now possible to use the
@OpenShiftDynamicImageStreamResource
annotation to generate an image stream. This image stream will be added to the freshly generated project and removed afterwards.This makes it easy to specify which images should be used for the test.
Background
Issue with testing OpenShift images is that we need to be able to specify which image should be tested. If you put tests in a pipeline you don't know what the image will be, but once it is executed, we know that information.
By definition tests should self-contained and prepare everything that is required to run the test. This includes image streams too IMHO. This is why generating an image stream beforehand and deploying it outside of the test is not really the way to go.
We can generate the image stream definition and it would be picked by the ARQ cube, but it looks pretty hacky to me.
Other option I investigated is to add another annotation, similar to the general one
@OpenShiftResource
, which would let me point to an existing IS definition and the processors inside Cube would just replace the image with the image provided, and possibly specify the insecurity of the repository. I implemented it that way, but I did not submit that idea because it looked a bit hacky (parsing JSON and YAML and replacing things).Changes proposed in this pull request:
@OpenShiftDynamicImageStreamResource
annotation