This repository was archived by the owner on Jan 30, 2025. It is now read-only.
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 @@ -384,11 +384,15 @@ pipeline {
384
384
cd ${TEMPDIR}/unraid/templates/
385
385
GH_TEMPLATES_DEFAULT_BRANCH=$(git remote show origin | grep "HEAD branch:" | sed 's|.*HEAD branch: ||')
386
386
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
392
396
else
393
397
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
394
398
git add unraid/${CONTAINER_NAME}.xml
You can’t perform that action at this time.
0 commit comments