Files
RetroDebian/Jenkinsfile
2026-03-21 14:45:50 +01:00

124 lines
5.3 KiB
Groovy

pipeline {
agent {
dockerfile {
filename 'Dockerfile'
dir '.'
label 'pyDABFActory-CIAgent'
// additionalBuildArgs '--no-cache-filter fetcher'
args '--privileged --security-opt seccomp=unconfined --security-opt apparmor=unconfined -u root:root'
}
}
stages {
stage('Prepare Docker cache markers') {
steps {
sh '''
mkdir -p .docker-cache
git ls-remote https://gitea.chacha.ddns.net/chacha/glide.git refs/heads/retrodebian \
| awk '{print $1}' > .docker-cache/glide.ref
test -s .docker-cache/glide.ref
echo "glide ref: $(cat .docker-cache/glide.ref)"
git ls-remote https://gitea.chacha.ddns.net/chacha/UT99-Official.git refs/heads/master \
| awk '{print $1}' > .docker-cache/ut99.ref
test -s .docker-cache/ut99.ref
echo "ut99 ref: $(cat .docker-cache/ut99.ref)"
'''
}
}
stage('Configure ISO') {
steps {
dir('root')
{
sh 'rm -Rf live artifacts'
}
dir('root/live')
{
sh '''
set -e
deb="$(ls -1 /root/linux-image-*.deb | head -n1)"
kernpkg="$(dpkg-deb -f "$deb" Package)"
echo "$kernpkg"
deb="$(ls -1 /root/squashfs-modules-*.deb | head -n1)"
squashfspkg="$(dpkg-deb -f "$deb" Package)"
echo "$squashfspkg"
lh_config \
-a i386 \
--distribution etch \
--apt apt \
--apt-options "--yes --force-yes" \
--apt-secure false \
--apt-recommends false \
--linux-packages "squashfs-modules-2.6.24 linux-image-2.6.24 device3dfx-modules-2.6.24" \
--packages-lists "desktop" \
--mirror-bootstrap http://archive.debian.org/debian/ \
--mirror-binary http://archive.debian.org/debian/ \
--mirror-binary-security http://archive.debian.org/debian-security/ \
--mirror-chroot http://archive.debian.org/debian/ \
--mirror-chroot-security http://archive.debian.org/debian-security/ \
--binary-images iso \
--bootloader syslinux \
--bootstrap debootstrap \
--debconf-frontend noninteractive \
--debian-installer live \
--bootappend-live "elevator=deadline" \
--hostname RetroDebian \
--iso-application RetroDebian \
--syslinux-splash config/binary_syslinux/splash.png \
--union-filesystem unionfs \
--username bob \
-k retrodebian1
chmod +x /root/update-initramfs.sh
chmod +x /root/zzz-config-live.sh
cp /root/update-initramfs.sh config/chroot_local-hooks
cp /root/zzz-config-live.sh config/chroot_local-hooks
cp /root/linux-image-*.deb config/chroot_local-packages/
cp /root/device3dfx-*.deb config/chroot_local-packages/
cp /root/squashfs-modules-*.deb config/chroot_local-packages/
cp /root/libglide*-cvg*_i386.deb config/chroot_local-packages/
cp /root/desktop config/chroot_local-packageslists/
mkdir -p config/chroot_local-includes/usr/share/wallpapers
cp /root/wallpaper.jpg config/chroot_local-includes/usr/share/wallpapers/retrodebian.jpg
cp /root/editions/voodoo2/splash.png config/binary_syslinux/
'''
}
}
}
stage('Configure games') {
steps {
dir('root/live') {
sh '''
mkdir -p config/chroot_local-includes/usr/local/games/ut99/
cp -R /root/ut-game/* config/chroot_local-includes/usr/local/games/ut99/
'''
}
}
}
stage('Build ISO') {
steps {
dir('root/live')
{
sh 'lh_build'
}
dir('root')
{
sh '''
mkdir artifacts
mv /root/*.deb artifacts/
'''
}
}
}
}
post {
success {
archiveArtifacts artifacts: 'root/live/*.iso', fingerprint: true
archiveArtifacts artifacts: 'root/artifacts/*.deb', fingerprint: true
deleteDir()
}
}
}