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 @@ -382,11 +382,15 @@ pipeline {
382382 cd ${TEMPDIR}/unraid/templates/
383383 GH_TEMPLATES_DEFAULT_BRANCH=$(git remote show origin | grep "HEAD branch:" | sed 's|.*HEAD branch: ||')
384384 if grep -wq "${CONTAINER_NAME}" ${TEMPDIR}/unraid/templates/unraid/ignore.list; then
385- echo "Image is on the ignore list, marking Unraid template as deprecated"
386- cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
387- git add -u unraid/${CONTAINER_NAME}.xml
388- git mv unraid/${CONTAINER_NAME}.xml unraid/deprecated/${CONTAINER_NAME}.xml || :
389- git commit -m 'Bot Moving Deprecated Unraid Template' || :
385+ if [[ -f ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ]]; then
386+ echo "Image is on the ignore list, marking Unraid template as deprecated"
387+ cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
388+ git add -u unraid/${CONTAINER_NAME}.xml
389+ git mv unraid/${CONTAINER_NAME}.xml unraid/deprecated/${CONTAINER_NAME}.xml || :
390+ git commit -m 'Bot Moving Deprecated Unraid Template' || :
391+ else
392+ echo "Image is on the ignore list, but no template exist, skipping deprecation"
393+ fi
390394 else
391395 cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
392396 git add unraid/${CONTAINER_NAME}.xml
You can’t perform that action at this time.
0 commit comments