@@ -277,7 +277,7 @@ pipeline {
277277 # ${TEMPDIR}/unraid/docker-templates: Cloned docker-templates repo to check for logos
278278 # ${TEMPDIR}/unraid/templates: Cloned templates repo for commiting unraid template changes and pushing back to Github
279279 git clone --branch master --depth 1 https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/docker-${CONTAINER_NAME}
280- docker run --rm -v ${TEMPDIR}/docker-${CONTAINER_NAME}:/tmp -e LOCAL=true ghcr.io/linuxserver/jenkins-builder:latest
280+ docker run --rm -v ${TEMPDIR}/docker-${CONTAINER_NAME}:/tmp -e LOCAL=true -e PUID=$(id -u) -e PGID=$(id -g) ghcr.io/linuxserver/jenkins-builder:latest
281281 echo "Starting Stage 1 - Jenkinsfile update"
282282 if [[ "$(md5sum Jenkinsfile | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile | awk '{ print $1 }')" ]]; then
283283 mkdir -p ${TEMPDIR}/repo
@@ -384,11 +384,15 @@ pipeline {
384384 cd ${TEMPDIR}/unraid/templates/
385385 GH_TEMPLATES_DEFAULT_BRANCH=$(git remote show origin | grep "HEAD branch:" | sed 's|.*HEAD branch: ||')
386386 if grep -wq "${CONTAINER_NAME}" ${TEMPDIR}/unraid/templates/unraid/ignore.list; then
387- echo "Image is on the ignore list, marking Unraid template as deprecated"
388- cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
389- git add -u unraid/${CONTAINER_NAME}.xml
390- git mv unraid/${CONTAINER_NAME}.xml unraid/deprecated/${CONTAINER_NAME}.xml || :
391- git commit -m 'Bot Moving Deprecated Unraid Template' || :
387+ if [[ -f ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ]]; then
388+ echo "Image is on the ignore list, marking Unraid template as deprecated"
389+ cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
390+ git add -u unraid/${CONTAINER_NAME}.xml
391+ git mv unraid/${CONTAINER_NAME}.xml unraid/deprecated/${CONTAINER_NAME}.xml || :
392+ git commit -m 'Bot Moving Deprecated Unraid Template' || :
393+ else
394+ echo "Image is on the ignore list, but no template exist, skipping deprecation"
395+ fi
392396 else
393397 cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
394398 git add unraid/${CONTAINER_NAME}.xml
@@ -610,7 +614,7 @@ pipeline {
610614 sh ''' #! /bin/bash
611615 set -e
612616 TEMPDIR=$(mktemp -d)
613- if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false " ]; then
617+ if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" != "true " ]; then
614618 LOCAL_CONTAINER=${IMAGE}:amd64-${META_TAG}
615619 else
616620 LOCAL_CONTAINER=${IMAGE}:${META_TAG}
0 commit comments