Look up the service image with the compose loader instead of parsing
the yaml separately, and only rewrite image lines which match it
exactly. Read images back via GetComposeConfig in the tests, drop
testify from them, and add an integration test for pinning services
which use variants of the same image.
Update the image of a single service instead of every service using
the same image name, only rewriting the tag and digest of its image
value so the registry host and the rest of the file are kept as is.
- skip images which use variables, warn to update them manually
- error on images which fail to parse instead of panicking
- drop a stale digest when upgrading a pinned image without
--pindigests, since it points at the image of the old tag
- error when the registry does not return a digest
- use docker cli credentials when fetching the digest, so private
registries work after docker login
Add tests for UpdatePinnedTag, UpdateTag and
GetImageMultiplatformDigest.
Less confusing logging messages, clear "is created" / "already exists"
output. Move the majority of logging to debug output to not confuse the
situation. Some code cleanups also in there.
See coop-cloud/organising#258
This fixes also how we read the digest of the image. I think it was
wrong before. Some registries restrict reading this info and we now just
default to "unknown" for that case.
This also appears to bring a wave of new dependencies due to the generic
handling logic of containers/... package. The abra binary is now 1mb
larger.
The catalogue generation is now slower unfortunately. But it is more
robust.
The generic logic looks in ~/.docker/config.json for log in details, so
you don't have to pass those in manually on the CLI anymore. We just
read those defaults. You can "docker login" to get credentials setup in
that file. Since most folks won't generate the catalogue, this seems
fine for now.