File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -386,11 +386,15 @@ pipeline {
386386 cd ${TEMPDIR}/unraid/templates/
387387 GH_TEMPLATES_DEFAULT_BRANCH=$(git remote show origin | grep "HEAD branch:" | sed 's|.*HEAD branch: ||')
388388 if grep -wq "${CONTAINER_NAME}" ${TEMPDIR}/unraid/templates/unraid/ignore.list; then
389- echo "Image is on the ignore list, marking Unraid template as deprecated"
390- cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
391- git add -u unraid/${CONTAINER_NAME}.xml
392- git mv unraid/${CONTAINER_NAME}.xml unraid/deprecated/${CONTAINER_NAME}.xml || :
393- git commit -m 'Bot Moving Deprecated Unraid Template' || :
389+ if [[ -f ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ]]; then
390+ echo "Image is on the ignore list, marking Unraid template as deprecated"
391+ cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
392+ git add -u unraid/${CONTAINER_NAME}.xml
393+ git mv unraid/${CONTAINER_NAME}.xml unraid/deprecated/${CONTAINER_NAME}.xml || :
394+ git commit -m 'Bot Moving Deprecated Unraid Template' || :
395+ else
396+ echo "Image is on the ignore list, but no template exist, skipping deprecation"
397+ fi
394398 else
395399 cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
396400 git add unraid/${CONTAINER_NAME}.xml
You can’t perform that action at this time.
0 commit comments