The matrix trimming logic was using the image info file as its source for processing Dockerfiles to be trimmed or not. This meant that any new Dockerfiles which have not yet been built/published were not being included because they were not represented in the image info file yet.
These changes update the logic to use the manifest as the source and then to look up the corresponding image info data from that. By using the manifest as the source, we're sure to process all Dockerfiles. This includes a bit of refactoring to share common code with the getStaleImages command which needs to use the same logic.
Fixes https://github.com/dotnet/docker-tools/issues/1476
The matrix trimming logic was using the image info file as its source for processing Dockerfiles to be trimmed or not. This meant that any new Dockerfiles which have not yet been built/published were not being included because they were not represented in the image info file yet.
These changes update the logic to use the manifest as the source and then to look up the corresponding image info data from that. By using the manifest as the source, we're sure to process all Dockerfiles. This includes a bit of refactoring to share common code with the
getStaleImages
command which needs to use the same logic.