Skip to content

feat(release): publish each contextful profile as an amd64 + arm64 image index - #244

Open
debuggingfuture wants to merge 1 commit into
mainfrom
feat/multi-arch-release-images
Open

debuggingfuture wants to merge 1 commit into
mainfrom
feat/multi-arch-release-images

Conversation

@debuggingfuture

Copy link
Copy Markdown
Member

Each contextful profile's release image is an OCI image index of a linux/amd64 and a linux/arm64 manifest (assurance.build.release-image, contextful #718).

  • Cells. Both Linux cells (x86_64-unknown-linux-musl, aarch64-unknown-linux-musl) run contextful-ci image after contextful-ci footprint and stage <profile>-<version>-linux-<arch>.layer.tar.gz plus its .image.json descriptor. The cell refuses a descriptor whose target, platform or layer path differs from its inputs.
  • Push. publishContainerImage takes one profile's two descriptors, amd64 first. pushGhcrImageIndex uploads each layer and the descriptor's config blob verbatim, PUTs each manifest verbatim by digest, then PUTs {"manifests":[amd64,arm64],"mediaType":"application/vnd.oci.image.index.v1+json","schemaVersion":2} under the version tag. Before any request it checks every config and manifest against its digest, the manifest's references against the layer and config, and the entry against the manifest. It opens a layer from R2 only when the registry lacks the blob. A tag already naming the same index is a no-op; a tag naming anything else is refused.
  • Release. The parent requires six image descriptors (3 profiles × 2 archs) and publishes one index per profile. ghcr-push.ts no longer builds its own config or manifest, and infra/build-oci-layer.sh, build-oci-layout.py and their test are gone from the release image.

The cell is 1.3.0 and the release 1.4.0. A tag that already names a single-platform manifest is refused, not overwritten.

…age index

Both Linux release cells build their platform's image with `contextful-ci image`
and stage its layer and `.image.json` descriptor. The parent pushes each
profile's config and manifest verbatim, by digest, then one OCI image index
under the version tag, so the index digest equals the one the build computed.
The Worker verifies every blob against its digest before pushing, and opens a
layer from R2 only when the registry lacks it.
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.

1 participant