Skip to content
This repository was archived by the owner on Dec 22, 2024. It is now read-only.

Commit c08f2de

Browse files
committed
Bot Updating Templated Files
1 parent bfb6e7b commit c08f2de

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Jenkinsfile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pipeline {
6161
returnStdout: true).trim()
6262
env.CODE_URL = 'https://github.com/' + env.IG_USER + '/' + env.IG_REPO + '/commit/' + env.GIT_COMMIT
6363
env.PULL_REQUEST = env.CHANGE_ID
64-
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/permissions.yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger.yml'
64+
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/permissions.yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger.yml'
6565
}
6666
sh '''#! /bin/bash
6767
echo "The default github branch detected as ${GH_DEFAULT_BRANCH}" '''
@@ -261,11 +261,8 @@ pipeline {
261261
# ${TEMPDIR}/docs/docker-documentation: Cloned docs repo for pushing docs updates to Github
262262
# ${TEMPDIR}/unraid/docker-templates: Cloned docker-templates repo to check for logos
263263
# ${TEMPDIR}/unraid/templates: Cloned templates repo for commiting unraid template changes and pushing back to Github
264-
mkdir -p ${TEMPDIR}/source
265-
git clone https://ImageGeniusCI:${GITHUB_TOKEN}@github.com/${IG_USER}/${IG_REPO}.git ${TEMPDIR}/source
266-
cd ${TEMPDIR}/source
267-
git checkout -f main
268-
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=main -v ${TEMPDIR}/source:/tmp -v ${TEMPDIR}:/ansible/jenkins ghcr.io/imagegenius/jenkins-builder:latest
264+
git clone --branch main --depth 1 https://ImageGeniusCI:${GITHUB_TOKEN}@github.com/${IG_USER}/${IG_REPO}.git ${TEMPDIR}/docker-${CONTAINER_NAME}
265+
docker run --rm -v ${TEMPDIR}/docker-${CONTAINER_NAME}:/tmp -e LOCAL=true ghcr.io/imagegenius/jenkins-builder:latest
269266
echo "Starting Stage 1 - Jenkinsfile update"
270267
if [[ "$(md5sum Jenkinsfile | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile | awk '{ print $1 }')" ]]; then
271268
mkdir -p ${TEMPDIR}/repo
@@ -340,6 +337,7 @@ pipeline {
340337
echo "false" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
341338
echo "No templates to update"
342339
fi
340+
echo "Starting Stage 4 - External repo update: Unraid Template"
343341
rm -Rf ${TEMPDIR}'''
344342
script{
345343
env.FILES_UPDATED = sh(

0 commit comments

Comments
 (0)