[go: up one dir, main page]

multi-platform support

Description

Support building manifest contains images for multiple architecture.

Mainly needed to support arm64 runners and pods.

See to-be-continuous/tools/dt-sbom-scanner#7 (closed)

Implementation ideas

⚠️ This is a tracking issue. Do not mention it in merge requests (or reopen it if needed)

Architectures

Either way implementation will be quite specify for each build tool.

All-in-one with emulation

A single job building everything with cross-compilation and pushing directly a manifest list

See https://github.com/containers/buildah/blob/main/docs/buildah-build.1.md#building-an-multi-architecture-image-using-the---manifest-option-requires-emulation-software and https://github.com/GoogleContainerTools/kaniko?tab=readme-ov-file#creating-multi-arch-container-manifests-using-kaniko-and-manifest-tool also possible with dind using buildx

Cons:

  • Need emulation support
  • Need to adapt package-test jobs to support scanning all platforms
  • Slower

Job per platform then merge

One build job per platform with a late job

See https://docs.gitlab.com/ci/docker/buildah_rootless_multi_arch/

Cons:

  • Need available runners for each platform (tags are no standard)
  • Complex with matrix for each platform
  • This job needs a new stage after package-build (or using needs: dependencies)

Job per platform with tags

Skip merge job and push a tag per platform

This is the old way of dealing with it. Recent tools all expect an single multi-platform manifest. But it is way simpler

Edited by Clement Bois