74 lines
3.1 KiB
Groovy
74 lines
3.1 KiB
Groovy
pipeline {
|
||
agent {
|
||
dockerfile {
|
||
filename 'Dockerfile'
|
||
dir '.'
|
||
label 'pyDABFActory-CIAgent'
|
||
args '--privileged --security-opt seccomp=unconfined --security-opt apparmor=unconfined -u root:root'
|
||
}
|
||
}
|
||
stages {
|
||
stage('Build ISO') {
|
||
steps {
|
||
dir('root')
|
||
{
|
||
sh 'rm -Rf live'
|
||
}
|
||
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 \
|
||
--apt apt \
|
||
−−apt−secure false \
|
||
--binary-images iso \
|
||
--bootloader syslinux \
|
||
--bootstrap debootstrap \
|
||
--debconf-frontend noninteractive \
|
||
--debian-installer live \
|
||
--hostname RetroDebian \
|
||
--distribution etch \
|
||
--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/ \
|
||
--union-filesystem unionfs \
|
||
--linux-packages "squashfs-modules-2.6.24 linux-image-2.6.24" \
|
||
−−username bob \
|
||
-k retrodebian1
|
||
|
||
chmod +x /root/update-initramfs.sh
|
||
chmod +x /root/autologin-fluxbox.sh
|
||
cp /root/update-initramfs.sh config/chroot_local-hooks
|
||
cp /root/autologin-fluxbox.sh config/chroot_local-hooks
|
||
cp /root/linux-image-*.deb config/chroot_local-packages/
|
||
cp /root/squashfs-modules-*.deb config/chroot_local-packages/
|
||
cp /root/desktop config/chroot_local-packageslists/
|
||
'''
|
||
sh 'lh_build'
|
||
}
|
||
}
|
||
}
|
||
stage('Collect ISO') {
|
||
steps {
|
||
sh '''
|
||
set -e
|
||
mkdir -p artifacts
|
||
find /root/live -name '*.iso' -exec cp -v {} artifacts/ \\;
|
||
ls -l artifacts
|
||
'''
|
||
archiveArtifacts artifacts: 'artifacts/*.iso', fingerprint: true
|
||
}
|
||
}
|
||
}
|
||
} |