Skip to content

Commit 5c7c4f4

Browse files
Bot Updating Templated Files
1 parent e5e020d commit 5c7c4f4

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
@@ -58,7 +58,7 @@ pipeline {
5858
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT
5959
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/'
6060
env.PULL_REQUEST = env.CHANGE_ID
61-
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'
61+
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'
6262
}
6363
script{
6464
env.LS_RELEASE_NUMBER = sh(
@@ -231,17 +231,14 @@ pipeline {
231231
}
232232
sh '''curl -sL https://raw.githubusercontent.com/linuxserver/docker-shellcheck/master/checkrun.sh | /bin/bash'''
233233
sh '''#! /bin/bash
234-
set -e
235-
docker pull ghcr.io/linuxserver/lsiodev-spaces-file-upload:latest
236234
docker run --rm \
237-
-e DESTINATION=\"${IMAGE}/${META_TAG}/shellcheck-result.xml\" \
238-
-e FILE_NAME="shellcheck-result.xml" \
239-
-e MIMETYPE="text/xml" \
240-
-v ${WORKSPACE}:/mnt \
241-
-e SECRET_KEY=\"${S3_SECRET}\" \
242-
-e ACCESS_KEY=\"${S3_KEY}\" \
243-
-t ghcr.io/linuxserver/lsiodev-spaces-file-upload:latest \
244-
python /upload.py'''
235+
-v ${WORKSPACE}:/mnt \
236+
-e AWS_ACCESS_KEY_ID=\"${S3_KEY}\" \
237+
-e AWS_SECRET_ACCESS_KEY=\"${S3_SECRET}\" \
238+
ghcr.io/linuxserver/baseimage-alpine:3.17 s6-envdir -fn -- /var/run/s6/container_environment /bin/bash -c "\
239+
apk add --no-cache py3-pip && \
240+
pip install s3cmd && \
241+
s3cmd put --no-preserve --acl-public -m text/xml /mnt/shellcheck-result.xml s3://ci-tests.linuxserver.io/${IMAGE}/${META_TAG}/shellcheck-result.xml" || :'''
245242
}
246243
}
247244
}
@@ -278,7 +275,7 @@ pipeline {
278275
echo "Jenkinsfile is up to date."
279276
fi
280277
# Stage 2 - Delete old templates
281-
OLD_TEMPLATES=".github/ISSUE_TEMPLATE.md\n.github/ISSUE_TEMPLATE/issue.bug.md\n.github/ISSUE_TEMPLATE/issue.feature.md"
278+
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"
282279
for i in ${OLD_TEMPLATES}; do
283280
if [[ -f "${i}" ]]; then
284281
TEMPLATES_TO_DELETE="${i} ${TEMPLATES_TO_DELETE}"
@@ -295,7 +292,7 @@ pipeline {
295292
git commit -m 'Bot Updating Templated Files'
296293
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
297294
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
298-
echo "Deleting old templates"
295+
echo "Deleting old and deprecated templates"
299296
rm -Rf ${TEMPDIR}
300297
exit 0
301298
else

0 commit comments

Comments
 (0)