Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit 518e32c

Browse files
Bot Updating Templated Files
1 parent aa67a41 commit 518e32c

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

Jenkinsfile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

0 commit comments

Comments
 (0)