Multi-platform OCI Pipelines and Runners
This section outlines how to enable multi-platform OCI image builds on GitLab, using the standard ARM runner pool or the BuildX pool when needed.
Running OCI build jobs on the ARM runner
A ready-made template lives at gitlab-ci/includes/oci-image.gitlab-ci.yml in the templates repository. When included, it exposes oci-image-build-armv5 and oci-image-build-armv8 jobs that execute on the ska-armv8 runner whenever the corresponding flag is enabled.
Add the template include together with the platform flag to your .gitlab-ci.yml:
include:
# OCI build lifecycle (lint, build, publish)
- project: 'ska-telescope/templates-repository'
file: 'gitlab-ci/includes/oci-image.gitlab-ci.yml'
variables:
OCI_USE_PLATFORM_ARMV5: "true"
This produces an oci-image-build-armv5 job that runs make oci-build-all on the ska-armv8 runners. The environment already pre-loads the Docker BuildX CLI plugins, registers QEMU binfmt handlers and configures the named builder declared in ska-ser-infra-machinery.
Switch to ARMv8 builds by setting OCI_USE_PLATFORM_ARMV8: "true" instead. Only one of the variables should be enabled at a time—each flag activates its matching job while the standard oci-image-build job is disabled to avoid double builds. Both flags use the ska-armv8 runner pool, so use the BuildX pool for other non-AMD64 platforms.
Using the BuildX runner tag directly
If you are crafting a custom job outside the shared template and need a non-AMD64 platform other than ARMv5 or ARMv8, target the BuildX pool directly with the ska-buildx tag:
tags:
- ska-buildx
The runner provides Docker BuildX and QEMU support out of the box; you only need to call your existing Make targets or scripts. Avoid duplicating the platform-selection logic in these jobs—prefer the template variables wherever possible so the behaviour stays consistent across projects.
Using the ARM runner tag directly
For custom jobs that should use the standard ARM pool (for example, to run auxiliary scripts alongside builds), target the ska-armv8 tag:
tags:
- ska-armv8