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

Commit 5d9f47d

Browse files
Bot Updating Templated Files
1 parent 22c1779 commit 5d9f47d

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

Jenkinsfile

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ pipeline {
5050
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT
5151
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/'
5252
env.PULL_REQUEST = env.CHANGE_ID
53-
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.yml ./.github/ISSUE_TEMPLATE/issue.feature.yml ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/stale.yml ./.github/workflows/call_invalid_helper.yml ./.github/workflows/permissions.yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger.yml'
53+
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.yml ./.github/ISSUE_TEMPLATE/issue.feature.yml ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/call_issue_pr_tracker.yml ./.github/workflows/call_issues_cron.yml ./.github/workflows/permissions.yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger.yml'
5454
}
5555
script{
5656
env.LS_RELEASE_NUMBER = sh(
@@ -222,17 +222,14 @@ pipeline {
222222
}
223223
sh '''curl -sL https://raw.githubusercontent.com/linuxserver/docker-shellcheck/master/checkrun.sh | /bin/bash'''
224224
sh '''#! /bin/bash
225-
set -e
226-
docker pull ghcr.io/linuxserver/lsiodev-spaces-file-upload:latest
227225
docker run --rm \
228-
-e DESTINATION=\"${IMAGE}/${META_TAG}/shellcheck-result.xml\" \
229-
-e FILE_NAME="shellcheck-result.xml" \
230-
-e MIMETYPE="text/xml" \
231-
-v ${WORKSPACE}:/mnt \
232-
-e SECRET_KEY=\"${S3_SECRET}\" \
233-
-e ACCESS_KEY=\"${S3_KEY}\" \
234-
-t ghcr.io/linuxserver/lsiodev-spaces-file-upload:latest \
235-
python /upload.py'''
226+
-v ${WORKSPACE}:/mnt \
227+
-e AWS_ACCESS_KEY_ID=\"${S3_KEY}\" \
228+
-e AWS_SECRET_ACCESS_KEY=\"${S3_SECRET}\" \
229+
ghcr.io/linuxserver/baseimage-alpine:3.17 s6-envdir -fn -- /var/run/s6/container_environment /bin/bash -c "\
230+
apk add --no-cache py3-pip && \
231+
pip install s3cmd && \
232+
s3cmd put --no-preserve --acl-public -m text/xml /mnt/shellcheck-result.xml s3://ci-tests.linuxserver.io/${IMAGE}/${META_TAG}/shellcheck-result.xml" || :'''
236233
}
237234
}
238235
}
@@ -269,7 +266,7 @@ pipeline {
269266
echo "Jenkinsfile is up to date."
270267
fi
271268
# Stage 2 - Delete old templates
272-
OLD_TEMPLATES=".github/ISSUE_TEMPLATE.md\n.github/ISSUE_TEMPLATE/issue.bug.md\n.github/ISSUE_TEMPLATE/issue.feature.md"
269+
OLD_TEMPLATES=".github/ISSUE_TEMPLATE.md .github/ISSUE_TEMPLATE/issue.bug.md .github/ISSUE_TEMPLATE/issue.feature.md .github/workflows/call_invalid_helper.yml .github/workflows/stale.yml"
273270
for i in ${OLD_TEMPLATES}; do
274271
if [[ -f "${i}" ]]; then
275272
TEMPLATES_TO_DELETE="${i} ${TEMPLATES_TO_DELETE}"
@@ -286,7 +283,7 @@ pipeline {
286283
git commit -m 'Bot Updating Templated Files'
287284
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
288285
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
289-
echo "Deleting old templates"
286+
echo "Deleting old and deprecated templates"
290287
rm -Rf ${TEMPDIR}
291288
exit 0
292289
else

0 commit comments

Comments
 (0)