Skip to content
Snippets Groups Projects
Commit 39438ac4 authored by Michal Suchanek's avatar Michal Suchanek
Browse files

Move build script of of .gitlab-ci.yml

This makes it possible to build images outside of gitlab
parent f69844d5
No related branches found
No related tags found
No related merge requests found
Pipeline #2917 failed
......@@ -14,26 +14,7 @@ variables:
build:
script: |
set -x
apt update -o Acquire::AllowReleaseInfoChange=true -o quiet::ReleaseInfoChange=true
apt-get --no-install-recommends -y install mmdebstrap ca-certificates e2fsprogs pigz git mount parted apt-utils libarchive-tools python3-apt bmap-tools wget dpkg-dev
if [ ! -e /proc/sys/fs/binfmt_misc/status ]; then
mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
fi
apt-get --no-install-recommends -y install arch-test qemu-user-static
arch-test arm64 || cat /usr/lib/binfmt.d/qemu-aarch64.conf > /proc/sys/fs/binfmt_misc/register
arch-test arm64
if [ -n "${REFORM_DEBIAN_PACKAGES_BRANCH:+x}" ]; then
echo "REFORM_DEBIAN_PACKAGES_BRANCH=${REFORM_DEBIAN_PACKAGES_BRANCH}" >&2
echo "downloading..." >&2
/usr/lib/apt/apt-helper download-file \
"https://source.mnt.re/$CI_PROJECT_NAMESPACE/reform-debian-packages/-/jobs/artifacts/${REFORM_DEBIAN_PACKAGES_BRANCH}/download?file_type=archiv&job=reprepro" \
"archive.zip"
echo "extracting..." >&2
mkdir -p ./repo
bsdtar --verbose --directory repo --strip-components=5 --extract --file archive.zip "*.deb"
fi
./mkimage.sh
./run-image-build.sh
after_script: |
if [ "$DIST" != "unstable" ]; then
echo "DIST: $DIST" >&2
......
#!/bin/sh
set -x
apt update -o Acquire::AllowReleaseInfoChange=true -o quiet::ReleaseInfoChange=true
apt-get --no-install-recommends -y install mmdebstrap ca-certificates e2fsprogs pigz git mount parted apt-utils libarchive-tools python3-apt bmap-tools wget dpkg-dev
if [ ! -e /proc/sys/fs/binfmt_misc/status ]; then
mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
fi
apt-get --no-install-recommends -y install arch-test qemu-user-static
arch-test arm64 || cat /usr/lib/binfmt.d/qemu-aarch64.conf > /proc/sys/fs/binfmt_misc/register
arch-test arm64
if [ -n "${REFORM_DEBIAN_PACKAGES_BRANCH:+x}" ]; then
echo "REFORM_DEBIAN_PACKAGES_BRANCH=${REFORM_DEBIAN_PACKAGES_BRANCH}" >&2
echo "downloading..." >&2
/usr/lib/apt/apt-helper download-file \
"https://source.mnt.re/$CI_PROJECT_NAMESPACE/reform-debian-packages/-/jobs/artifacts/${REFORM_DEBIAN_PACKAGES_BRANCH}/download?file_type=archiv&job=reprepro" \
"archive.zip"
echo "extracting..." >&2
mkdir -p ./repo
bsdtar --verbose --directory repo --strip-components=5 --extract --file archive.zip "*.deb"
fi
./mkimage.sh
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment