trying to automatise image conversion
This commit is contained in:
52
Jenkinsfile
vendored
52
Jenkinsfile
vendored
@@ -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'
|
||||
}
|
||||
}
|
||||
|
||||
|
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 |
Reference in New Issue
Block a user