diff --git a/.docker-cache/glide.ref b/.docker-cache/glide.ref new file mode 100644 index 0000000..e69de29 diff --git a/.docker-cache/ut99.ref b/.docker-cache/ut99.ref new file mode 100644 index 0000000..e69de29 diff --git a/Dockerfile b/Dockerfile index c899214..3bc62ab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,12 @@ -FROM i386/alpine:latest AS fetcher +FROM i386/alpine:latest AS glide-fetcher ARG CACHE_BUST=10 RUN apk add --no-cache git ca-certificates +COPY .docker-cache/glide.ref /tmp/glide.ref WORKDIR /src -RUN echo "$CACHE_BUST" && git clone --depth 1 --branch retrodebian --single-branch https://gitea.chacha.ddns.net/chacha/glide.git +RUN cat /tmp/glide.ref > /dev/null && \ + echo "$CACHE_BUST" > /dev/null && \ + git clone --depth 1 --branch retrodebian --single-branch https://gitea.chacha.ddns.net/chacha/glide.git && \ + rm -Rf glide/.git # building a modified Kernel + modules + libs FROM lpenz/debian-etch-i386-minbase AS kernel-builder @@ -24,7 +28,7 @@ RUN (echo "deb http://archive.debian.org/debian etch main non-free" > /etc/apt/s # Preparing Kernel + patchs + modules WORKDIR /usr/src -COPY --from=fetcher /src/glide glide +COPY --from=glide-fetcher /src/glide glide COPY unionfs-2.2.3_for_2.6.24.diff.gz ./ COPY nvidia.patch ./ RUN tar xjf linux-source-2.6.24.tar.bz2 && \ @@ -118,12 +122,16 @@ RUN /usr/src/buildglidepkg.sh sst1 #RUN rm *.gz *.bz2 && rm -Rf glide && rm -rf /var/lib/apt/lists/* -FROM i386/alpine:latest AS game-builder +FROM i386/alpine:latest AS ut99-builder RUN apk add --no-cache git ca-certificates ARG CACHE_BUST=10 +COPY .docker-cache/ut99.ref /tmp/ut99.ref # Package UT99 WORKDIR /root -RUN echo "$CACHE_BUST" && git clone --depth 1 --branch master --single-branch https://gitea.chacha.ddns.net/chacha/UT99-Official.git ut-game +RUN cat /tmp/ut99.ref > /dev/null && \ + echo "$CACHE_BUST" && \ + git clone --depth 1 --branch master --single-branch https://gitea.chacha.ddns.net/chacha/UT99-Official.git ut-game && \ + rm -Rf ut-game/.git COPY games/ut99/ut-install-436.run ./ RUN chmod +x ut-install-436.run && \ ./ut-install-436.run --target ./ut || true && \ @@ -159,7 +167,7 @@ RUN chmod +x ut-install-436.run && \ FROM lpenz/debian-lenny-i386-minbase WORKDIR /root COPY --from=kernel-builder /usr/src/*.deb . -COPY --from=game-builder /root/ut-game ./ut-game +COPY --from=ut99-builder /root/ut-game ./ut-game COPY update-initramfs.sh . COPY zzz-config-live.sh . COPY desktop . diff --git a/Jenkinsfile b/Jenkinsfile index 2255832..a8a5684 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,12 +4,28 @@ pipeline { filename 'Dockerfile' dir '.' label 'pyDABFActory-CIAgent' - additionalBuildArgs '--no-cache-filter fetcher' +// additionalBuildArgs '--no-cache-filter fetcher' args '--privileged --security-opt seccomp=unconfined --security-opt apparmor=unconfined -u root:root' } } stages { - stage('Build ISO') { + 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') { @@ -49,7 +65,7 @@ pipeline { --bootappend-live "elevator=deadline" \ --hostname RetroDebian \ --iso-application RetroDebian \ - --syslinux-splash config/splash.png \ + --syslinux-splash config/binary_syslinux/splash.png \ --union-filesystem unionfs \ --username bob \ -k retrodebian1 @@ -65,13 +81,24 @@ pipeline { 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/ + cp /root/editions/voodoo2/splash.png config/binary_syslinux/ ''' + } + } + } + stage('Configure games') { + steps { 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' }