trying to automatise image conversion

This commit is contained in:
2026-03-21 21:22:23 +01:00
parent 42ef30f28f
commit eb21a80074
5 changed files with 50 additions and 2 deletions

52
Jenkinsfile vendored
View File

@@ -17,6 +17,56 @@ pipeline {
'''
}
}
stage('Convert images')
{
agent {
docker {
image 'dpokidov/imagemagick'
reuseNode true
}
}
steps {
sh '''
set -eu
found_edition=0
for edition_dir in editions/*; do
[ -d "$edition_dir" ] || continue
found_edition=1
set -- "$edition_dir"/splash-source.*
if [ ! -e "$1" ]; then
echo "ERROR: missing splash-source.* in $edition_dir" >&2
exit 1
fi
if [ $# -ne 1 ]; then
echo "ERROR: multiple splash-source.* files in $edition_dir" >&2
exit 1
fi
src="$1"
out="$edition_dir/splash.jpg"
echo "Converting $src -> $out"
magick "$src" \
-resize 640x480! \
-background black \
-alpha remove -alpha off \
-colorspace sRGB \
-strip \
-quality 95 \
"$out"
done
if [ "$found_edition" -eq 0 ]; then
echo "ERROR: no edition directory found under editions/" >&2
exit 1
fi
'''
}
}
stage('Create live')
{
agent {
@@ -102,7 +152,6 @@ pipeline {
chmod +x config/chroot_local-includes/usr/local/bin/neofetch
cp /root/editions/voodoo2/splash.jpg config/binary_syslinux/
'''
}
}
}
@@ -120,7 +169,6 @@ pipeline {
steps {
dir('root/live')
{
sh 'lh_build'
}
}

View File

Before

Width:  |  Height:  |  Size: 552 KiB

After

Width:  |  Height:  |  Size: 552 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 KiB