From 85e497444733032c84bda466d8291892260df36e Mon Sep 17 00:00:00 2001 From: LinuxServer-CI Date: Thu, 20 Aug 2020 23:38:42 -0400 Subject: [PATCH] Bot Updating Templated Files --- Jenkinsfile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d4e44c7..6b6bfa2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -51,7 +51,7 @@ pipeline { env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/' env.PULL_REQUEST = env.CHANGE_ID - env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE.md ./.github/PULL_REQUEST_TEMPLATE.md' + env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE.md ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/greetings.yml ./.github/workflows/stale.yml' } script{ env.LS_RELEASE_NUMBER = sh( @@ -237,7 +237,7 @@ pipeline { cd ${TEMPDIR}/repo/${LS_REPO} git checkout -f calibre cd ${TEMPDIR}/docker-${CONTAINER_NAME} - mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github + mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows cp --parents ${TEMPLATED_FILES} ${TEMPDIR}/repo/${LS_REPO}/ cd ${TEMPDIR}/repo/${LS_REPO}/ git add ${TEMPLATED_FILES} @@ -608,6 +608,10 @@ pipeline { ] ]) { sh '''#! /bin/bash + set -e + TEMPDIR=$(mktemp -d) + docker pull linuxserver/jenkins-builder:latest + docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=calibre -v ${TEMPDIR}:/ansible/jenkins linuxserver/jenkins-builder:latest docker pull lsiodev/readme-sync docker run --rm=true \ -e DOCKERHUB_USERNAME=$DOCKERUSER \ @@ -615,7 +619,9 @@ pipeline { -e GIT_REPOSITORY=${LS_USER}/${LS_REPO} \ -e DOCKER_REPOSITORY=${IMAGE} \ -e GIT_BRANCH=master \ - lsiodev/readme-sync bash -c 'node sync' ''' + -v ${TEMPDIR}/docker-${CONTAINER_NAME}:/mnt \ + lsiodev/readme-sync bash -c 'node sync' + rm -Rf ${TEMPDIR} ''' } } }