Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for appending indexes with oci_append #155

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

joshrwolf
Copy link
Contributor

splits the existing image only oci_append into 2 legs, one using the existing image only approach and the other with a loop appending the indexes

@imjasonh imjasonh merged commit f0a5474 into chainguard-dev:main Jul 29, 2024
7 checks passed
@joshrwolf joshrwolf mentioned this pull request Jul 30, 2024
joshrwolf added a commit that referenced this pull request Aug 5, 2024
the index append introduced in #155 created a valid index but didn't
properly append the image contents to it. instead it was simply
appending an index manifest to the index 🤦

this PR fixes that and adds another test to catch it (I think?). ideally
I'd like the test to push up a platform specific image(s) but I can't
figure out how to do that with `random.Image`.

I've at least tested this locally and it appears to be generating a
proper index:

```
{
  "schemaVersion": 2,
  "mediaType": "application/vnd.oci.image.index.v1+json",
  "manifests": [
    {
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "size": 562,
      "digest": "sha256:c5316b34c4564257960ce18e73b6f421cae0e67c5e3cf18a97cd755947c071c4",
      "platform": {
        "architecture": "amd64",
        "os": "linux"
      }
    },
    {
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "size": 561,
      "digest": "sha256:dad0b65b0a055bcee31b5888d5435c5f73e25785f0e92be473996fb060bb62eb",
      "platform": {
        "architecture": "arm64",
        "os": "linux"
      }
    }
  ]
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants