Closed Sven-Niehus closed 4 years ago
@Sven-Niehus Hi Sven,
have found issue in this functionality. Try to call e.g.:
Get-ContainerImageCurrentness -ImageName bcinsider.azurecr.io/bconprem:cz
It is ignoring the fact that I am using non-default registry and is still looking into the default one.
This is output example:
PS > Get-ContainerImageCurrentness -ImageName bcinsider.azurecr.io/bconprem:cz
WARNING: The image mcr.microsoft.com/bcinsider.azurecr.io/bconprem:cz: could not be found locally
The local version of the image mcr.microsoft.com/bcinsider.azurecr.io/bconprem:cz: is NOT the latest version
You need to specify the registry.
Example: Get-ContainerImageCurrentness -ImageName "businesscentral/sandbox" -ImageTag "ltsc2019" -Registry "mcr.microsoft.com"
Ok, but in my case the image name includes this - bcinsider.azurecr.io/bconprem:cz. I expect that it will be parsed from there, because you are assigning it in this way, else I need to change your code to support bcinsider image, because right now it gives warning because the code is not working correctly.
Ok, sorry, the call should be Get-ContainerImageCurrentness -Image bcinsider.azurecr.io/bconprem:cz
The result is>
WARNING: The image mcr.microsoft.com/bconprem:cz could not be found locally
The local version of the image mcr.microsoft.com/bconprem:cz is NOT the latest version
Add a new function to check if the local downloaded image is the latest available version.
If a new version is available download it, else use the already downloaded version