Skip to content
Snippets Groups Projects
Verified Commit a314e480 authored by Johannes Schauer Marin Rodrigues's avatar Johannes Schauer Marin Rodrigues
Browse files

allow using packages from a custom reform-debian-packages branch by setting...

allow using packages from a custom reform-debian-packages branch by setting REFORM_DEBIAN_PACKAGES_BRANCH in the gitlab web interface
parent cffe9a78
No related branches found
No related tags found
1 merge request!88easy custom *.deb repo and creating images for experimental and testing via gitlab pipeline web interface
......@@ -5,6 +5,9 @@ variables:
DIST:
description: "distribution to build image for like testing, unstable and experimental"
value: unstable
REFORM_DEBIAN_PACKAGES_BRANCH:
description: "if set, prefer *.deb packages created by the latest pipeline run from this reform-debian-packages branch"
value:
build:
script: |
......@@ -16,9 +19,13 @@ build:
echo "refusing to build image for anything but unstable on main branch" >&2
exit 1
fi
if [ -n "$REFORM_DEBIAN_PACKAGES_BRANCH" ]; then
echo "refusing to build image using packages from reform-debian-packages branch" >&2
exit 1
fi
fi
apt update -o Acquire::AllowReleaseInfoChange=true -o quiet::ReleaseInfoChange=true
apt-get --no-install-recommends -y install mmdebstrap genext2fs ca-certificates e2fsprogs pigz git mount parted apt-utils
apt-get --no-install-recommends -y install mmdebstrap genext2fs ca-certificates e2fsprogs pigz git mount parted apt-utils unzip
if [ ! -e /proc/sys/fs/binfmt_misc/status ]; then
mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
fi
......
......@@ -87,7 +87,7 @@ case "$MIRROR" in
esac
# make sure build tools are installed
set -- mmdebstrap genext2fs e2fsprogs git mount parted
set -- mmdebstrap genext2fs e2fsprogs git mount parted unzip
if [ "$(dpkg --print-architecture)" != arm64 ]; then
set -- "$@" arch-test qemu-user-static
fi
......@@ -150,6 +150,13 @@ done
"https://source.mnt.re/reform/reform-ls1028a-uboot/-/raw/main/ls1028a-mhdpfw.bin" \
ls1028a-mhdpfw.bin "SHA1:fa96b9aa59d7c1e9e6ee1c0375d0bcc8f8e5b78c"
if [ -n "${REFORM_DEBIAN_PACKAGES_BRANCH:+x}" ]; then
/usr/lib/apt/apt-helper download-file \
"https://source.mnt.re/reform/reform-debian-packages/-/jobs/artifacts/${REFORM_DEBIAN_PACKAGES_BRANCH}/download?file_type=archiv&job=reprepro" \
"archive.zip"
unzip -v -j archive.zip '*.deb' -d ./repo
fi
# create Packages and Release file for custom repo
if [ -n "$(find repo -maxdepth 1 -name "*.deb" -print -quit)" ]; then
echo "I: Creating repository from *.deb in ./repo and serving via HTTP" >&2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment