Skip to content
This repository was archived by the owner on Feb 12, 2020. It is now read-only.

Commit 16b1086

Browse files
Bot Updating Templated Files
1 parent 09eb3af commit 16b1086

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Jenkinsfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,15 @@ pipeline {
209209
else
210210
echo "false" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
211211
fi
212+
mkdir -p ${TEMPDIR}/gitbook
213+
git clone https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/gitbook/docker-documentation
214+
if [ "${BRANCH_NAME}" = "master" ] && [ ! -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
215+
cp ${TEMPDIR}/${CONTAINER_NAME}/docker-${CONTAINER_NAME}.md ${TEMPDIR}/gitbook/docker-documentation/images/
216+
cd ${TEMPDIR}/gitbook/docker-documentation/
217+
git add images/docker-${CONTAINER_NAME}.md
218+
git commit -m 'Bot Updating Templated Files'
219+
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git --all
220+
fi
212221
rm -Rf ${TEMPDIR}'''
213222
script{
214223
env.FILES_UPDATED = sh(

0 commit comments

Comments
 (0)