Use buildah for nonfree image

This commit is contained in:
Jeffrey Serio 2024-03-05 20:55:46 -06:00
parent 05250d60f8
commit 3b2ba7eda5

View File

@ -33,12 +33,18 @@ compose-job:
nonfree-build-job:
stage: build
tags:
- podman-in-podman
- podman-exec
image: git.hyperreal.coffee:5050/fedora-atomic/containers/buildah:latest
variables:
PODMAN_IMAGE_NAME: "${CI_REGISTRY_IMAGE}/vauxite-nonfree:39"
STORAGE_DRIVER: vfs
BUILDAH_FORMAT: docker
BUILDAH_ISOLATION: chroot
FQ_IMAGE_NAME: "$CI_REGISTRY_IMAGE/vauxite-nonfree:39"
before_script:
- podman login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
- buildah login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
script:
- cd oci/nonfree
- podman build -t "$PODMAN_IMAGE_NAME" .
- podman push "$PODMAN_IMAGE_NAME"
- container=$(buildah from git.hyperreal.coffee:5050/fedora-atomic/vauxite-build/vauxite:39)
- buildah run $container -- rpm-ostree install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-39.noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-39.noarch.rpm
- buildah run $container -- rpm-ostree override remove libavcodec-free libavfilter-free libavformat-free libavutil-free libpostproc-free libswresample-free libswscale-free --install ffmpeg-libs
- buildah run $container -- ostree container commit
- buildah commit $container "$FQ_IMAGE_NAME"