Skip to content

Commit

Permalink
Bot Updating Templated Files
Browse files Browse the repository at this point in the history
  • Loading branch information
LinuxServer-CI committed May 6, 2024
1 parent 60983bd commit b4e758e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -393,11 +393,15 @@ pipeline {
cd ${TEMPDIR}/unraid/templates/
GH_TEMPLATES_DEFAULT_BRANCH=$(git remote show origin | grep "HEAD branch:" | sed 's|.*HEAD branch: ||')
if grep -wq "${CONTAINER_NAME}" ${TEMPDIR}/unraid/templates/unraid/ignore.list; then
echo "Image is on the ignore list, marking Unraid template as deprecated"
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
git add -u unraid/${CONTAINER_NAME}.xml
git mv unraid/${CONTAINER_NAME}.xml unraid/deprecated/${CONTAINER_NAME}.xml || :
git commit -m 'Bot Moving Deprecated Unraid Template' || :
if [[ -f ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ]]; then
echo "Image is on the ignore list, marking Unraid template as deprecated"
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
git add -u unraid/${CONTAINER_NAME}.xml
git mv unraid/${CONTAINER_NAME}.xml unraid/deprecated/${CONTAINER_NAME}.xml || :
git commit -m 'Bot Moving Deprecated Unraid Template' || :
else
echo "Image is on the ignore list, but no template exist, skipping deprecation"
fi
else
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
git add unraid/${CONTAINER_NAME}.xml
Expand Down

0 comments on commit b4e758e

Please sign in to comment.