mirror of
https://github.com/linuxserver/docker-code-server.git
synced 2024-11-22 20:15:41 +01:00
Bot Updating Templated Files
This commit is contained in:
parent
722941437f
commit
d29b22e87d
18
Jenkinsfile
vendored
18
Jenkinsfile
vendored
@ -381,16 +381,14 @@ pipeline {
|
|||||||
echo "Updating Unraid template"
|
echo "Updating Unraid template"
|
||||||
cd ${TEMPDIR}/unraid/templates/
|
cd ${TEMPDIR}/unraid/templates/
|
||||||
GH_TEMPLATES_DEFAULT_BRANCH=$(git remote show origin | grep "HEAD branch:" | sed 's|.*HEAD branch: ||')
|
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
|
if grep -wq "${CONTAINER_NAME}" ${TEMPDIR}/unraid/templates/unraid/ignore.list && [[ -f ${TEMPDIR}/unraid/templates/unraid/deprecated/${CONTAINER_NAME}.xml ]]; then
|
||||||
if [[ -f ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ]]; then
|
echo "Image is on the ignore list, and already in the deprecation folder."
|
||||||
echo "Image is on the ignore list, marking Unraid template as deprecated"
|
elif grep -wq "${CONTAINER_NAME}" ${TEMPDIR}/unraid/templates/unraid/ignore.list; then
|
||||||
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
|
echo "Image is on the ignore list, marking Unraid template as deprecated"
|
||||||
git add -u unraid/${CONTAINER_NAME}.xml
|
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
|
||||||
git mv unraid/${CONTAINER_NAME}.xml unraid/deprecated/${CONTAINER_NAME}.xml || :
|
git add -u unraid/${CONTAINER_NAME}.xml
|
||||||
git commit -m 'Bot Moving Deprecated Unraid Template' || :
|
git mv unraid/${CONTAINER_NAME}.xml unraid/deprecated/${CONTAINER_NAME}.xml || :
|
||||||
else
|
git commit -m 'Bot Moving Deprecated Unraid Template' || :
|
||||||
echo "Image is on the ignore list, but no template exist, skipping deprecation"
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
|
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
|
||||||
git add unraid/${CONTAINER_NAME}.xml
|
git add unraid/${CONTAINER_NAME}.xml
|
||||||
|
Loading…
Reference in New Issue
Block a user