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