The readme says that you can use a regex pattern in image_name to use the latest image that matches that pattern. For example
driver:
image_name: "example-ol-8-.*"
notice I'm leaving off any start/end of line anchors in the expression, but I'd expect that to behave the same as:
driver:
image_name: "^example-ol-8-.*$"
In Kitchen::Driver::Oci::Models::Compute#image_id_by_name it does a select over all the images to find ones where the display name matches the pattern:
|
image_list = images.select { |i| i.display_name.match(/#{image_name}/) } |
This actually works as expected and I've looked at the list returned and they do match what I'm looking for. However, the next part of that same method calls filter_image_list which adds on an additional pattern:
|
image_list.select { |i| i.display_name.match(/#{image_name}-[0-9]{4}\.[0-9]{2}\.[0-9]{2}/) } |
And none of my images match that because why would they. It's effectively making my pattern into:
example-ol-8-.*-[0-9]{4}\.[0-9]{2}\.[0-9]{2}
or if I add the anchors it's even worse:
^example-ol-8-.*$-[0-9]{4}\.[0-9]{2}\.[0-9]{2}
I assume that's a YYYY-mm-dd pattern for date that is at the end of some official Oracle Linux image display names, but it certainly isn't on all OCI images.
The readme says that you can use a regex pattern in
image_nameto use the latest image that matches that pattern. For examplenotice I'm leaving off any start/end of line anchors in the expression, but I'd expect that to behave the same as:
In
Kitchen::Driver::Oci::Models::Compute#image_id_by_nameit does a select over all the images to find ones where the display name matches the pattern:kitchen-oci/lib/kitchen/driver/oci/models/compute.rb
Line 83 in c072173
This actually works as expected and I've looked at the list returned and they do match what I'm looking for. However, the next part of that same method calls
filter_image_listwhich adds on an additional pattern:kitchen-oci/lib/kitchen/driver/oci/models/compute.rb
Line 107 in c072173
And none of my images match that because why would they. It's effectively making my pattern into:
example-ol-8-.*-[0-9]{4}\.[0-9]{2}\.[0-9]{2}or if I add the anchors it's even worse:
^example-ol-8-.*$-[0-9]{4}\.[0-9]{2}\.[0-9]{2}I assume that's a
YYYY-mm-ddpattern for date that is at the end of some official Oracle Linux image display names, but it certainly isn't on all OCI images.