Bot Updating Templated Files

This commit is contained in:
LinuxServer-CI 2020-08-20 23:38:42 -04:00
parent fca86db64c
commit 85e4974447

12
Jenkinsfile vendored
View File

@ -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} '''
}
}
}