Open jlewi opened 1 year ago
So I think one function that needs to change is resolveImageToSha https://github.com/jlewi/hydros/blob/6650d2508b24cf14cc49723059023fa9e1c99ffd/pkg/gitops/syncer.go#L945
That is currently using ECR APIs / client libraries to resolve an image tag to a sha. We should be able to use crane libraries for this. e.g the crane CLI does this as follows.
gcrane digest us-west1-docker.pkg.dev/chat-lewi/autobuilder/agent:latest
I think it should be straightforward to support the source commit strategy. Since that strategy resolves images by tag. I think we just need to update this if statement to support tag strategy https://github.com/jlewi/hydros/blob/3933b1d7e3d02dd77976c5f8a0244ef7a68a0590/pkg/gcp/artifactregistry.go#L79
Support finding the latest images in GCR (right now ECR is supported)