From b482081fc40a2d0e25c810346fac7a261397f67e Mon Sep 17 00:00:00 2001 From: Roxedus Date: Thu, 9 May 2024 15:01:13 +0200 Subject: [PATCH] Properly detect exsiting templates --- roles/generate-jenkins/templates/Jenkinsfile.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/generate-jenkins/templates/Jenkinsfile.j2 b/roles/generate-jenkins/templates/Jenkinsfile.j2 index f78ecee3..4461c517 100644 --- a/roles/generate-jenkins/templates/Jenkinsfile.j2 +++ b/roles/generate-jenkins/templates/Jenkinsfile.j2 @@ -592,7 +592,7 @@ pipeline { fi {% endif %} if grep -wq "${CONTAINER_NAME}" ${TEMPDIR}/unraid/templates/unraid/ignore.list; then - if [[ -f ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ]]; then + if [[ -f ${TEMPDIR}/unraid/templates/unraid/${CONTAINER_NAME}.xml ]] || [[ -f ${TEMPDIR}/unraid/templates/unraid/deprecated/${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