mirror of
https://codeberg.org/hyperreal/vauxite-build
synced 2024-11-01 16:53:12 +01:00
54 lines
2.1 KiB
YAML
54 lines
2.1 KiB
YAML
stages:
|
|
- compose
|
|
- build
|
|
|
|
compose-job:
|
|
stage: compose
|
|
tags:
|
|
- podman-exec
|
|
variables:
|
|
RELVER: "39"
|
|
SOURCE_URL: "https://pagure.io/workstation-ostree-config"
|
|
CACHE_DIR: "/cache"
|
|
BUILD_REPO: "/build-repo"
|
|
SOURCE_REPO: "/source-repo"
|
|
before_script:
|
|
- podman image prune -f
|
|
- podman login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
|
|
script:
|
|
- mkdir -p "$(pwd)/.tmp"
|
|
- |
|
|
if [ ! -d "${BUILD_REPO}/objects" ]; then
|
|
echo "Previous build repo not found. Initialize new build repo in archive mode."
|
|
ostree --repo="${BUILD_REPO}" init --mode=archive
|
|
fi
|
|
- |
|
|
if [ ! -d "${SOURCE_REPO}/.git" ]; then
|
|
echo "Source repo not found. Clone from upstream."
|
|
git clone -b "f${RELVER}" "${SOURCE_URL}" "${SOURCE_REPO}"
|
|
fi
|
|
- rsync -aAX "${SOURCE_REPO}"/ "$(pwd)/.tmp"
|
|
- rsync -aAX "$(pwd)/src/" "$(pwd)/.tmp"
|
|
- rpm-ostree compose image --cachedir "${CACHE_DIR}" --initialize-mode=if-not-exists --format=registry "$(pwd)/.tmp/vauxite.json" "${CI_REGISTRY_IMAGE}/vauxite:${RELVER}"
|
|
|
|
nonfree-build-job:
|
|
stage: build
|
|
tags:
|
|
- buildah-exec
|
|
image: git.hyperreal.coffee:5050/fedora-atomic/containers/buildah:latest
|
|
variables:
|
|
STORAGE_DRIVER: overlay2
|
|
BUILDAH_FORMAT: docker
|
|
BUILDAH_ISOLATION: chroot
|
|
FQ_IMAGE_NAME: "$CI_REGISTRY_IMAGE/vauxite-nonfree:39"
|
|
before_script:
|
|
- buildah prune -f
|
|
- buildah login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
|
|
script:
|
|
- 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 --squash --rm $container "$FQ_IMAGE_NAME"
|
|
- buildah push "$FQ_IMAGE_NAME"
|