do not use untrusted docker image
This commit is contained in:
9
Jenkinsfile
vendored
9
Jenkinsfile
vendored
@@ -21,20 +21,18 @@ pipeline {
|
||||
{
|
||||
agent {
|
||||
docker {
|
||||
image 'dpokidov/imagemagick'
|
||||
image 'alpine:3.21'
|
||||
reuseNode true
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh '''
|
||||
set -eu
|
||||
|
||||
apk add --no-cache imagemagick
|
||||
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
|
||||
@@ -44,12 +42,9 @@ pipeline {
|
||||
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 \
|
||||
|
||||
Reference in New Issue
Block a user