From 95a1ffb22af34d827a4c4bd430b965f09f110e44 Mon Sep 17 00:00:00 2001 From: LinuxServer-CI Date: Tue, 5 Feb 2019 18:46:45 +0000 Subject: [PATCH] Bot Updating Templated Files --- Jenkinsfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 74cc7cd..112aa00 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -209,6 +209,15 @@ pipeline { else echo "false" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER} fi + mkdir -p ${TEMPDIR}/gitbook + git clone https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/gitbook/docker-documentation + if [ ! -f ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md ] || [ "$(md5sum ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/${CONTAINER_NAME}/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')" ]; then + cp ${TEMPDIR}/${CONTAINER_NAME}/docker-${CONTAINER_NAME}.md ${TEMPDIR}/gitbook/docker-documentation/images/ + cd ${TEMPDIR}/gitbook/docker-documentation/ + git add images/docker-${CONTAINER_NAME}.md + git commit -m 'Bot Updating Templated Files' + git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git --all + fi rm -Rf ${TEMPDIR}''' script{ env.FILES_UPDATED = sh(