Replies: 1 comment
-
Curiously: Simplifying the process with something like: .buildah native:
image: quay.io/buildah/stable:v1.21.0
extends:
- .container build
services:
- docker:dind
variables:
FF_ENABLE_BASH_EXIT_CODE_CHECK: "true"
before_script:
- mkdir -p build
- export CONTAINER_HOST=tcp://docker:2375/
- echo "Building ${GL_BUILD_TAG} ${QUAY_BUILD_TAG} using ${SCRIPT_DIR}/${SCRIPT_NAME}"
- mkdir -p /run/containers/$UID/
- echo "$DOCKERCFG" > /run/containers/$UID/auth.json
- export fed_ver=$(echo $FGC | tr -d f)
- mkdir -p /var/cache/dnf/$fed_ver
- dnf install -y podman
- sudo podman run --rm --privileged docker.io/multiarch/qemu-user-static --reset -p yes
script:
- bash -e $SCRIPT_DIR/$SCRIPT_NAME
- export CONTAINER=$(buildah containers --format "{{.ContainerName}}")
- buildah commit $CONTAINER $GL_BUILD_TAG
- buildah commit $CONTAINER $QUAY_BUILD_TAG
- buildah push -f oci --tls-verify=false $GL_BUILD_TAG
- buildah push $QUAY_BUILD_TAG
- buildah push -f docker $GL_BUILD_TAG oci:build/image
parallel:
matrix:
- ARCH:
- amd64
- arm64
cache:
paths:
- /var/cache/dnf
artifacts:
paths:
- build/image Results in whatever build finishes first wins first for the arch.... /shrug "Architecture": "arm64",
"Os": "linux" |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all. Throughout the week I've been experimenting with getting multi-arch builds going on GitLab CI. I've overcame most of the major hurdles, though stuck on one..
Consider this Gitlab job:
The order of operations and things to special note is:
an example build script. which get's executed in GitLab CI and
$ARCH
gets populatedThis results in each arch (arm64, amd64) getting built successfully though failing to push arm64.
This somewhat makes sense.. since this job only built for arm64 and doesn't have a amd64 image but how do I instruct buildah to not worry about amd64 when pushing?
Beta Was this translation helpful? Give feedback.
All reactions